A compound of formula, or a pharmaceutically acceptable salt thereof; wherein R 1 is hydrogen, halogen, cyano or hydroxy; C 1-6 alkyl, C 1-6 alkoxy, C 1-6 alkylsulfanyl, C 1-6 alkylsulfinyl, C 1-6 alkylsulfonyl, (C 1-6 -alkylsulfonyl)amino or (C 1-6 -alkylsulfonyl)amino(C 1-6 alkyl), any of which groups may be substituted by one or more substituents; selected from C 1-6 alkyl, C 3-8 cycloalkyl, amino, acyl, acyloxy, acylamino, amido, alkoxycarbonyl, ureido, carbamate, aryl, heterocycle, heteroaryl, heterocycloalky, sulfanyl, sulfinyl, sulfonyl, C 1-6 alkoxy, sulfanyl, sulphoximines, halogen, trihalomethyl, cyano and hydroxy; R 2 is hydrogen, cyano, halogen; or C 1-6 alkyl, C 1-6 alkoxy, C 1-6 alkylsulfanyl, C 1-6 alkylsulfinyl, C 1-6 alkylsulfonyl, C 1-6 alkylsulfonylamino, (C 1-6 alkylsulfonyl)amino(C 1-6 alkyl), C 1-6 alkylamido, (C 1-6 alkylacyl)amino, (C 1-6 alkylacyl)amino(C 1-6 alkyl), or heteroaryl, any of which groups may be substituted by one or more substituents selected from C 1-6 alkyl, C 3-8 cycloalkyl, amino, acyl, acyloxy, acylamino, amido, alkoxycarbonyl, ureido, carbamate, aryl, heterocycle, heteroaryl, heterocycloalky, sulfanyl, sulfinyl, sulfonyl, C 1-6 alkoxy, sulfanyl, sulphoximines, halogen, trihalomethyl, cyano and hydroxy.; or R 1 and R 2 are linked together to form with the adjacent aromatic group a bicycle of formula (i): wherein R 2b is hydrogen or C 1-6 alkylsulfonyl; R 3 is halogen, C 1-6 alkyl, C 1-6 alkoxy or cyano; R 4 is hydrogen, halogen, C 1-6 alkyl, hydroxy, C 1-6 alkoxy, C 1-6 alkylsulfonyl, C 1-6 alkoxycarbonyloxy or C 1-6 alkylaminocarbonyloxy; R 5 is hydrogen, cyano, hydroxy or nitro; or C 1-6 alkyl; or C 1-6 alkoxy, C 1-6 -alkylsulfonyl, C 1-6- alkylsulfonylamino; C 1-6 -alkylsulfonylamino(C 1-6 alkyl), heterocycle, C 1-6 alkylacylamino, C 1-6 alkylacylamino(C 1-6 alkyl); C 1-6 alkylureido(C 1-6 alkyl); C 1-6 alkylcarbamate(C 1-6 alkyl); amido; C 1-6 alkoxycarbonyl, C 1-6 alkoxycarbonyloxy(C 1-6 alkyl); amino group; N-cyano-S-(C 1-6 -alkyl)sulfonimidoyl, N,S-(di-C 1-6 -alkyl)sulfonimidoyl, aminosulfinyl; C 1-6- alkylsulfinyl; aminosulfonyl; (di-C 1-6 -alkyl)(oxido)-λ 6 -sulfanylidene-amino; amino(C 1-6 alkyl), amido(C 1-6 alkyl) or amido(C 1-6 alkoxy); any of which groups may be optionally substituted by one or more substituents selected from halogen, hydroxy, oxo, C 1-6 alkyl, tetrahydropyranyl, and trifluoromethyl; R 6 is hydrogen or cyano; R 7 is either hydrogen or (C 1-6 -alkylsulfonyl)amino; X is either CR 9 or N; wherein R 9 is hydrogen, halogen or C 1-6 -alkyl substituted by hydroxy. Z is CH or N; and Y is CH 2 or NH. R 1 is hydrogen, halogen, cyano or hydroxy; C 1-6 alkyl, C 1-6 alkoxy, C 1-6 alkylsulfanyl, C 1-6 alkylsulfinyl, C 1-6 alkylsulfonyl, (C 1-6 -alkylsulfonyl)amino or (C 1-6 -alkylsulfonyl)amino(C 1-6 alkyl), any of which groups may be substituted by one or more substituents; selected from C 1-6 alkyl, C 3-8 cycloalkyl, amino, acyl, acyloxy, acylamino, amido, alkoxycarbonyl, ureido, carbamate, aryl, heterocycle, heteroaryl, heterocycloalky, sulfanyl, sulfinyl, sulfonyl, C 1-6 alkoxy, sulfanyl, sulphoximines, halogen, trihalomethyl, cyano and hydroxy; R 2 is hydrogen, cyano, halogen; or C 1-6 alkyl, C 1-6 alkoxy, C 1-6 alkylsulfanyl, C 1-6 alkylsulfinyl, C 1-6 alkylsulfonyl, C 1-6 alkylsulfonylamino, (C 1-6 alkylsulfonyl)amino(C 1-6 alkyl), C 1-6 alkylamido, (C 1-6 alkylacyl)amino, (C 1-6 alkylacyl)amino(C 1-6 alkyl), or heteroaryl, any of which groups may be substituted by one or more substituents selected from C 1-6 alkyl, C 3-8 cycloalkyl, amino, acyl, acyloxy, acylamino, amido, alkoxycarbonyl, ureido, carbamate, aryl, heterocycle, heteroaryl, heterocycloalky, sulfanyl, sulfinyl, sulfonyl, C 1-6 alkoxy, sulfanyl, sulphoximines, halogen, trihalomethyl, cyano and hydroxy.; or R 1 and R 2 are linked together to form with the adjacent aromatic group a bicycle of formula (i): wherein R 2b is hydrogen or C 1-6 alkylsulfonyl; R 3 is halogen, C 1-6 alkyl, C 1-6 alkoxy or cyano; R 4 is hydrogen, halogen, C 1-6 alkyl, hydroxy, C 1-6 alkoxy, C 1-6 alkylsulfonyl, C 1-6 alkoxycarbonyloxy or C 1-6 alkylaminocarbonyloxy; R 5 is hydrogen, cyano, hydroxy or nitro; or C 1-6 alkyl; or C 1-6 alkoxy, C 1-6 -alkylsulfonyl, C 1-6- alkylsulfonylamino; C 1-6 -alkylsulfonylamino(C 1-6 alkyl), heterocycle, C 1-6 alkylacylamino, C 1-6 alkylacylamino(C 1-6 alkyl); C 1-6 alkylureido(C 1-6 alkyl); C 1-6 alkylcarbamate(C 1-6 alkyl); amido; C 1-6 alkoxycarbonyl, C 1-6 alkoxycarbonyloxy(C 1-6 alkyl); amino group; N-cyano-S-(C 1-6 -alkyl)sulfonimidoyl, N,S-(di-C 1-6 -alkyl)sulfonimidoyl, aminosulfinyl; C 1-6- alkylsulfinyl; aminosulfonyl; (di-C 1-6 -alkyl)(oxido)-λ 6 -sulfanylidene-amino; amino(C 1-6 alkyl), amido(C 1-6 alkyl) or amido(C 1-6 alkoxy); any of which groups may be optionally substituted by one or more substituents selected from halogen, hydroxy, oxo, C 1-6 alkyl, tetrahydropyranyl, and trifluoromethyl; R 6 is hydrogen or cyano; R 7 is either hydrogen or (C 1-6 -alkylsulfonyl)amino; X is either CR 9 or N; wherein R 9 is hydrogen, halogen or C 1-6 -alkyl substituted by hydroxy. Z is CH or N; and Y is CH 2 or NH.