Compounds having the general formula I or III,and pharmaceutical compositions comprising the same. The compounds of the present invention are useful as selective mutant epidermal growth factor receptor tyrosine kinase (EGFR-TK) inhibitor, and for the treatment of EGFR related diseases and disorders such as cancer.