A compound of the formula I: wherein: X is -N(R 6)- or -C(R 8 R 9)-; Y is -N= or -CH=; Z is -N= or -CH=; R 1, R 2 and R 3 are independently selected from: hydrogen, halogen, hydroxyl, C 1-6 alkyl, which is unsubstituted or substituted with substituents selected from: hydroxy and fluoro, -O-C 1-6 alkyl, which is unsubstituted or substituted with substituents selected from fluoro, C 3-6 cycloalkyl, C 2-6 alkynyl, and -CN; R 4 is selected from: hydrogen, -CH 3; -CF 3, -CH 2 OH, -CO 2 H, and -CH 2 CH 3; R 5 is a phenyl, pyridyl, pyrazinyl, pyrazolyl, pyrimidinyl, pyridazinyl, thiazolyl, cyclohexyl or tetrahydropyranyl ring, wherein the phenyl, pyridyl, pyrazinyl, pyrazolyl, pyrimidinyl, pyridazinyl, thiazolyl, cyclohexyl or tetrahydropyranyl ring is substituted with R 1a, R 1b and R 1c, wherein R 1a, R 1b and R 1c are independently selected from: hydrogen, halogen, hydroxyl, C 1-6 alkyl, which is unsubstituted or substituted with substituents selected from: hydroxy and fluoro, -O-C 1-6 alkyl, which is unsubstituted or substituted with substituents selected from fluoro, C 3-6 cycloalkyl, azetidine, morpholine, piperidine, or pyrrolidine, and -CN; R 6 is selected from: hydrogen, and C 1-6 alkyl; R 7 is selected from: hydrogen, C 1-6 alkyl, which is unsubstituted or substituted with substituents selected from: hydroxy and fluoro, C 2-6 alkenyl, C 3-6 cycloalkyl, which is unsubstituted or substituted with substituents selected from: hydroxy and fluoro, and azetidine, morpholine, piperidine, or pyrrolidine; or R 6 and R 7 and the -CH-N- to which they are attached are joined to form an azetidine or a pyrrolidine ring; R 8 and R 9 are independently selected from: hydrogen, and C 1-6 alkyl; or a pharmaceutically acceptable salt thereof. X is -N(R 6)- or -C(R 8 R 9)-; Y is -N= or -CH=; Z is -N= or -CH=; R 1, R 2 and R 3 are independently selected from: hydrogen, halogen, hydroxyl, C 1-6 alkyl, which is unsubstituted or substituted with substituents selected from: hydroxy and fluoro, -O-C 1-6 alkyl, which is unsubstituted or substituted with substituents selected from fluoro, C 3-6 cycloalkyl, C 2-6 alkynyl, and -CN; hydrogen, halogen, hydroxyl, C 1-6 alkyl, which is unsubstituted or substituted with substituents selected from: hydroxy and fluoro, -O-C 1-6 alkyl, which is unsubstituted or substituted with substituents selected from fluoro, C 3-6 cycloalkyl, C 2-6 alkynyl, and -CN; R 4 is selected from: hydrogen, -CH 3; -CF 3, -CH 2 OH, -CO 2 H, and -CH 2 CH 3; hydrogen, -CH 3; -CF 3, -CH 2 OH, -CO 2 H, and -CH 2 CH 3; R 5 is a phenyl, pyridyl, pyrazinyl, pyrazolyl, pyrimidinyl, pyridazinyl, thiazolyl, cyclohexyl or tetrahydropyranyl ring, wherein the phenyl, pyridyl, pyrazinyl, pyrazolyl, pyrimidinyl, pyridazinyl, thiazolyl, cyclohexyl or tetrahydropyranyl ring is substituted with R 1a, R 1b and R 1c, wherein R 1a, R 1b and R 1c are independently selected from: hydrogen, halogen, hydroxyl, C 1-6 alkyl, which is unsubstituted or substituted with substituents selected from: hydroxy and fluoro, -O-C 1-6 alkyl, which is unsubstituted or substituted with substituents selected from fluoro, C 3-6 cycloalkyl, azetidine, morpholine, piperidine, or pyrrolidine, and -CN; hydrogen, halogen, hydroxyl, C 1-6 alkyl, which is unsubstituted or substituted with substituents selected from: hydroxy and fluoro, -O-C 1-6 alkyl, which is unsubstituted or substituted with substituents selected from fluoro, C 3-6 cycloalkyl, azetidine, morpholine, piperidine, or pyrrolidine, and -CN; R 6 is selected from: hydrogen, and C 1-6 alkyl; hydrogen, and C 1-6 alkyl; R 7 is selected from: hydrogen, C 1-6 alkyl, which is unsubstituted or substituted with substituents selected from: hydroxy and fluoro, C 2-6 alkenyl, C 3-6 cycloalkyl, which is unsubstituted or substituted with substituents selected from: hydroxy and fluoro, and azetidine, morpholine, piperidine, or pyrrolidine; or R 6 and R 7 and the -CH-N- to which they are attached are joined to form an azetidine or a pyrrolidine ring; hydrogen, C 1-6 alkyl, which is unsubstituted or substituted with substituents selected from: hydroxy and fluoro, C 2-6 alkenyl, C 3-6 cycloalkyl, which is unsubstituted or substituted with substituents selected from: hydroxy and fluoro, and azetidine, morpholine, piperidine, or pyrrolidine; or R 6 and R 7 and the -CH-N- to which they are attached are joined to form an azetidine or a pyrrolidine ring; R 8 and R 9 are independently selected from: hydrogen, and C 1-6 alkyl; hydrogen, and C 1-6 alkyl; or a pharmaceutically acceptable salt thereof.