A compound of formula I: wherein: R 1 and R 2 are each independently hydrogen, C 1-7 alkyl or C 3-10 carbocycle, with the proviso that both R 1 and R 2 are not hydrogen; R 3 is a 5-11 membered heteroaryl ring containing one to three heteroatoms selected from nitrogen, oxygen and sulfur, wherein the heteroaryl ring is optionally independently substituted with one to three groups selected from C 1-5 alkyl, C 1-5 alkoxy, C 1-3 alkylhydroxy, amino, C 1-3 alkylamino, C 1-3 dialkylamino, oxo, -CN, halogen, and 5-6 membered heteroaryl optionally substituted with one to three methyl groups; R 4 is hydrogen, C 1-3 alkyl, halogen or nitrile; R 5 is C 1-6 alkyl, C 3-10 carbocycle, 5-11 membered heterocycle, aryl, 5-11 membered heteroaryl, -C -R 6 or -NR 7 R 8, wherein each R 5 is optionally independently substituted with one to three groups selected from R 9, R 10 and R 11; R 6 is C 3-8 heterocycle or -NH-5-6 membered heterocycle, each optionally independently substituted with one to three groups selected from R 9, R 10 and R 11; R 7 and R 8 are each independently hydrogen or C 1-6 alkyl, wherein the alkyl group is optionally substituted with -OH or C 1-3 alkoxy; R 9, R 10 and R 11 are independently selected from (a) -H, (b) -OH, (c) halogen, (d) -CN, (e) -CF 3, (f) C 1-6 alkyl optionally substituted with one to three -OH, -N(R 12)(R 13), 3-6 membered heterocycle, C 1-6 alkoxy, halogen, CN, -CO 2 R 12, -O- C 1-6 alkyl-O- C 1-3 alkyl, -C N(R 12)(R 13) or -S n C 1-6 alkyl, (g) C 1-6 alkoxy, (h) -N(R 12)(R 13), (i) -S n C 1-6 alkyl, (j) -CO 2 R 12, (k) -C N(R 12)(R 13), (l) -S 2 N(R 12)(R 13), (m) a 3-10 membered heterocyclic group optionally substituted with one to three C 1-6 alkyl groups or oxo, (n') oxo, (o) -C -C 1-3 alkyl; (p) alkenyl of up to 6 carbon atoms optionally substituted with a -OH; R 12 and R 13 are each independently selected from -H, -C 1-6 alkyl, C C 1-6 alkyl, C 3-6 carbocycle and a 3-6 membered heterocyclic group, each of which is optionally independently substituted with one to three C 1-6 alkyl groups, halogen, -OH, C 1-6 alkoxy,-C N(R 14)(R 15), -S n C 1-6 alkyl, CN, a 3-6 membered heterocyclic group, -OC 1-6 alkyl, CF 3, or; R 12 and R 13 taken together with the nitrogen atom to which they are attached form a heterocyclyl ring optionally substituted with one to three -OH, CN, -OC 1-6 alkyl or oxo; R 14 and R 15 are each independently selected from -H and -C 1-6 alkyl; n is 0, 1 or 2; or a pharmaceutically acceptable salt thereof. R 1 and R 2 are each independently hydrogen, C 1-7 alkyl or C 3-10 carbocycle, with the proviso that both R 1 and R 2 are not hydrogen; R 3 is a 5-11 membered heteroaryl ring containing one to three heteroatoms selected from nitrogen, oxygen and sulfur, wherein the heteroaryl ring is optionally independently substituted with one to three groups selected from C 1-5 alkyl, C 1-5 alkoxy, C 1-3 alkylhydroxy, amino, C 1-3 alkylamino, C 1-3 dialkylamino, oxo, -CN, halogen, and 5-6 membered heteroaryl optionally substituted with one to three methyl groups; R 4 is hydrogen, C 1-3 alkyl, halogen or nitrile; R 5 is C 1-6 alkyl, C 3-10 carbocycle, 5-11 membered heterocycle, aryl, 5-11 membered heteroaryl, -C -R 6 or -NR 7 R 8, wherein each R 5 is optionally independently substituted with one to three groups selected from R 9, R 10 and R 11; R 6 is C 3-8 heterocycle or -NH-5-6 membered heterocycle, each optionally independently substituted with one to three groups selected from R 9, R 10 and R 11; R 7 and R 8 are each independently hydrogen or C 1-6 alkyl, wherein the alkyl group is optionally substituted with -OH or C 1-3 alkoxy; R 9, R 10 and R 11 are independently selected from (a) -H, (b) -OH, (c) halogen, (d) -CN, (e) -CF 3, (f) C 1-6 alkyl optionally substituted with one to three -OH, -N(R 12)(R 13), 3-6 membered heterocycle, C 1-6 alkoxy, halogen, CN, -CO 2 R 12, -O- C 1-6 alkyl-O- C 1-3 alkyl, -C N(R 12)(R 13) or -S n C 1-6 alkyl, (g) C 1-6 alkoxy, (h) -N(R 12)(R 13), (i) -S n C 1-6 alkyl, (j) -CO 2 R 12, (k) -C N(R 12)(R 13), (l) -S 2 N(R 12)(R 13), (m) a 3-10 membered heterocyclic group optionally substituted with one to three C 1-6 alkyl groups or oxo, (n') oxo, (o) -C -C 1-3 alkyl; (p) alkenyl of up to 6 carbon atoms optionally substituted with a -OH; (a) -H, (b) -OH, (c) halogen, (d) -CN, (e) -CF 3, (f) C 1-6 alkyl optionally substituted with one to three -OH, -N(R 12)(R 13), 3-6 membered heterocycle, C 1-6 alkoxy, halogen, CN, -CO 2 R 12, -O- C 1-6 alkyl-O- C 1-3 alkyl, -C N(R 12)(R 13) or -S n C 1-6 alkyl, (g) C 1-6 alkoxy, (h) -N(R 12)(R 13), (i) -S n C 1-6 alkyl, (j) -CO 2 R 12, (k) -C N(R 12)(R 13), (l) -S 2 N(R 12)(R 13), (m) a 3-10 membered heterocyclic group optionally substituted with one to three C 1-6 alkyl groups or oxo, (n') oxo, (o) -C -C 1-3 alkyl; (p) alkenyl of up to 6 carbon atoms optionally substituted with a -OH; R 12 and R 13 are each independently selected from -H, -C 1-6 alkyl, C C 1-6 alkyl, C 3-6 carbocycle and a 3-6 membered heterocyclic group, each of which is optionally independently substituted with one to three C 1-6 alkyl groups, halogen, -OH, C 1-6 alkoxy,-C N(R 14)(R 15), -S n C 1-6 alkyl, CN, a 3-6 membered heterocyclic group, -OC 1-6 alkyl, CF 3, or; R 12 and R 13 taken together with the nitrogen atom to which they are attached form a heterocyclyl ring optionally substituted with one to three -OH, CN, -OC 1-6 alkyl or oxo; R 14 and R 15 are each independently selected from -H and -C 1-6 alkyl; n is 0, 1 or 2; or a pharmaceutically acceptable salt thereof.