A compound of formula: or a pharmaceutically acceptable salt thereof, wherein: each X is independently selected from the group consisting of halo, -OH, -NO 2, -C≡N, (C 1 -C 6)alkyl, (C 1 -C 6)perhaloalkyl, (C 1 -C 6)alkoxy, (C 1 -C 6)perhaloalkoxy, (C 6 -C 14)aryl, (C 6 -C 14)aryloxy, (C 4 -C 7)heterocycloalkyl, (5- or 6-membered)heteroaryl, (C 6 -C 14)aryloxy, -SH, -SR', -S R', -S OH, -S OR', -SO 2 NHOH, -SO 2 NH 2, -NH 2, -NHR', -NR'R", cycloalkoxy, -C OH, -C OR', -C NH 2, C NHR', -C NR'R"; wherein said aryl, heterocycloalkyl and heteroaryl are unsubstituted or substituted with 1, 2, 3, 4 or 5 substituents selected from R 4; each R 4 is independently selected from the group consisting of halo, -OH, -C≡N, -NO 2,-SH, =O, =S, =N-(C 1 -C 4)alkyl, (C 1 -C 6)alkyl, (C 2 -C 6)alkenyl, (C 2 -C 6)alkynyl, (C 1 -C 6)alkoxy, (C 2 -C 6)alkenyloxy, (C 2 -C 6)alkynyloxy, (C 6 -C 14)aryl, (C 3 -C 6)cycloalkyl, (5- or 6-membered)heteroaryl, (C 4 -C 7)heterocycloalkyl, -C H, -C NH 2, -C OH, -NH-C -NH 2, -NH-C, -NH 2, -SC≡N, -SO 2 NH 2, -COR', -C OR',C NHR', -C NR'R", -NH 2, -NHR',-NR'R", -SR', -S R', -S OR', and -OR'; wherein R' and R" are independently selected from (C 1 -C 6)alkyl, (C 2 -C 6)alkenyl, (C 2 -C 6)alkynyl, (C 6 -C 14)aryl, (C 3 -C 6)cycloalkyl, (5- or 6-membered)heteroaryl and (C 4 -C 7)heterocycloalkyl; n is 0, 1 or 2; p is 1, 2 or 3; and R 1 and R 2 are independently selected from H, halo and (C 1 -C 6)alkyl optionally substituted with one or more independently selected halo(s), or R 1 and R 2 together with the carbon to which each is attached form (C 3 -C 6)cycloalkyl or (C 4 -C 7)heterocycloalkyl; provided that: (a) if n is 0 and p is 1, then R 1 and R 2 are not H; (b) if n is 1, X is COOH, and p is 1, then R 1 and R 2 are not H; and (c) if n is 2, each X is methyl, and p is 1, then R 1 and R 2 are not H. each X is independently selected from the group consisting of halo, -OH, -NO 2, -C≡N, (C 1 -C 6)alkyl, (C 1 -C 6)perhaloalkyl, (C 1 -C 6)alkoxy, (C 1 -C 6)perhaloalkoxy, (C 6 -C 14)aryl, (C 6 -C 14)aryloxy, (C 4 -C 7)heterocycloalkyl, (5- or 6-membered)heteroaryl, (C 6 -C 14)aryloxy, -SH, -SR', -S R', -S OH, -S OR', -SO 2 NHOH, -SO 2 NH 2, -NH 2, -NHR', -NR'R", cycloalkoxy, -C OH, -C OR', -C NH 2, C NHR', -C NR'R"; wherein said aryl, heterocycloalkyl and heteroaryl are unsubstituted or substituted with 1, 2, 3, 4 or 5 substituents selected from R 4; each R 4 is independently selected from the group consisting of halo, -OH, -C≡N, -NO 2,-SH, =O, =S, =N-(C 1 -C 4)alkyl, (C 1 -C 6)alkyl, (C 2 -C 6)alkenyl, (C 2 -C 6)alkynyl, (C 1 -C 6)alkoxy, (C 2 -C 6)alkenyloxy, (C 2 -C 6)alkynyloxy, (C 6 -C 14)aryl, (C 3 -C 6)cycloalkyl, (5- or 6-membered)heteroaryl, (C 4 -C 7)heterocycloalkyl, -C H, -C NH 2, -C OH, -NH-C -NH 2, -NH-C, -NH 2, -SC≡N, -SO 2 NH 2, -COR', -C OR',C NHR', -C NR'R", -NH 2, -NHR',-NR'R", -SR', -S R', -S OR', and -OR'; wherein R' and R" are independently selected from (C 1 -C 6)alkyl, (C 2 -C 6)alkenyl, (C 2 -C 6)alkynyl, (C 6 -C 14)aryl, (C 3 -C 6)cycloalkyl, (5- or 6-membered)heteroaryl and (C 4 -C 7)heterocycloalkyl; n is 0, 1 or 2; p is 1, 2 or 3; and R 1 and R 2 are independently selected from H, halo and (C 1 -C 6)alkyl optionally substituted with one or more independently selected halo(s), or R 1 and R 2 together with the carbon to which each is attached form (C 3 -C 6)cycloalkyl or (C 4 -C 7)heterocycloalkyl; provided that: (a) if n is 0 and p is 1, then R 1 and R 2 are not H; (b) if n is 1, X is COOH, and p is 1, then R 1 and R 2 are not H; and (c) if n is 2, each X is methyl, and p is 1, then R 1 and R 2 are not H. (a) if n is 0 and p is 1, then R 1 and R 2 are not H; (b) if n is 1, X is COOH, and p is 1, then R 1 and R 2 are not H; and (c) if n is 2, each X is methyl, and p is 1, then R 1 and R 2 are not H.