FIELD: chemistry.SUBSTANCE: invention relates to organic chemistry, particularly to a heterocyclic compound of formula I or a pharmaceutically acceptable salt thereof, where W represents CR3; X and Z are CH or N; R1 selected from chlorine, phenyl, heteroaryl (selected from furan, pyridine, pyrimidine, isoxazole, imidazole and pyrazole), heterocyclyl (selected from pyrrolidine, piperidine, morpholine, piperazine, azetidine, 6-azaspiro[3.4]octane, 2-oxa-6-azaspiro[3.4]octane, 2-oxa-6-azaspiro[3.3]heptane, thiomorpholine-1,1-dioxide, 7-oxa-2-azaspiro[3.5]nonane, 6-oxa-2-azaspiro[3.4]octane, 2-oxa-7-azaspiro[4.4]nonane, 2-oxa-6-azaspiro[3.5]nonane and dihydropyran), (3-6C)cycloalkyl, NR7R8, OR9, S(O)pR9 (where p = 0), N(R10)SO2R9 or N(R10)SOR9; and where R1 is optionally substituted with 1–2 substituents selected from fluorine, cyano, hydroxy, (1-4C)alkyl, (1-4C)alkoxy, S(O)qCH3 (where q = 2) and piperidine, and where any (1-4C)alkyl, (1-4C)alkoxy or heterocyclyl part present in the substituent group in R1, is optionally further substituted with 1-2 substituents selected from fluorine, hydroxy, (1-4C)alkyl, NRaRb, ORa and C(O)ORa, where each of Ra and Rb is independently selected from H or (1-4C)alkyl; R3 represents hydrogen, (1-4C)alkyl or (3-6C)cycloalkyl; R4 represents hydrogen or (1-3C)alkyl; Ar has the formula,where (i) all of A1, A2 and A3 represent CH or (ii) one of A1 and A2 represents N and others represent CH; R5 is selected from hydrogen, cyano, (1-3C)alkyl, (1-3C)alkoxy, (1-3C)fluoroalkoxy and halogen and where any alkyl or alkoxy parts present in the substituent group R5, are optionally further substituted with hydroxy or methoxy; R6 is selected from halogen or cyano or R6 represents a group of formula -L1-L2-R17, where L1 is absent, L2 is absent or is selected from O, SO2, C(O) or C(O)N(R20), where each of R20 and R21 is independently selected from hydrogen or (1-2C)alkyl, and R17 is (1-6C)alkyl, heteroaryl (selected from imidazole, pyrazole, isoxazole, tr