FIELD: chemistry.SUBSTANCE: invention relates to a novel compound of formula I or a pharmaceutically acceptable salt thereof that inhibit kinase activity of the epidermal growth factor receptor (EGFR) or mutant forms thereof, selected from (i) L858R, (ii) T790M, (iii) L858R and T790M, (iv) delE746_A750 or (v) delE746_A750 and T790M, or ALK activity. Cancer caused by EGFR is non-small cell lung cancer (NSCLS), glioblastoma, pancreatic cancer, cancer of the head and neck (for example, squamous cell carcinoma), breast cancer, colorectal cancer, epithelial cancer, cancer of the ovaries, prostate cancer or adenocarcinoma. In the formula I,X is NR16 R16 is H Y is halogen or unsubstituted or halogen substituted C1-6alkyl Z is O or CR20R21 and each R20 or R21 independently represents H R1 is hydroxy, N(R8)(R9), C(O)OR8, C1-4alkyl, 5-6 membered saturated heterocyclyl containing 1-2 heteroatoms selected from nitrogen or nitrogen and oxygen each R8 and R9 is independently H, C1-C4alkyl, hydroxy-C1-4alkyl, di(C1-C4alkyl)amino-C1-C4alkyl, 4-6 membered saturated heterocyclyl containing 1-2 heteroatoms selected from nitrogen which may be substituted with C2alkenyl carbonyl group, C3-C6-cycloalkyl R2 is H R3 is H R4 is H, C1-6alkoxy, halogen, 5-6-membered -O-heterocyclyl with 1 or 2 heteroatoms, selected from nitrogen and oxygen or -NR24(CH2)PNR24R25 and P is 0, 1, 2 or 3, and each R24 or R25 independently represents H, unsubstituted C1-6alkyl R5 is H, F, C1-6alkyl, haloalkyl, C1-6alkoxy, halogen C1-6alkoxy, (diC1-C4alkyl) aminoC1-6alkoxy, -NR15C(O)(CH2)nCR17=CR18R19, -NR15C(O)(CH2)nCR17=CH(CH2)mNR18R19, m or n is independently 0 and each of R15, R17, R18 or R19 is independently absent, is -H R7 is H, halogen, C1-6alkyl, C1-6alkoxy, -NR22C(O)CR23=CR10R11, -NR22C(O)CR23(CH2)sCHR10Rl1,,where n=0, m=1, one of R18 and R19 is independently absent, and the other is a 3-6-membered nitrogen-containing saturated heterocyclyl or an amino group substituted with C1-C4alkyl -NR22C(O)CR23=CR10(C