A compound of formula: or a pharmaceutically acceptable salt thereof, wherein: R 3 is H; X 1 is N or CR 4; R 2 is H, F, R', OH, OR', COR', COOH, COOR', CONH 2, CONHR', CON(R') 2, or CN; R 4 is H, F, R', OH, OR', COR', COOH, COOR', CONH 2, CONHR', CON(R') 2, or CN; or R 2 and R 4, taken together, form a 5-7 membered aryl or heteroaryl ring optionally substituted with 1-4 occurrences of R 10; R' is a C 1-3 aliphatic optionally substituted with 1-4 occurrences of R 5; each R 5 is independently selected from halogen, CF 3, OCH 3, OH, SH, NO 2, NH 2, SCH 3, NCH 3, CN or unsubstituted C 1-2 aliphatic, or two R 5 groups, together with the carbon to which they are attached, form a cyclopropyl ring or C=O; each R 10 is independently selected from halogen, OCH 3, OH, NO 2, NH 2, SH, SCH 3, NCH 3, CN or unsubstituted C 1-2 aliphatic; R 1 is R" is H or is a C 1-2 aliphatic optionally substituted with 1-3 occurrences of R 11; each R 11 is independently selected from halogen, OCH 3, OH, SH, NO 2, NH 2, SCH 3, NCH 3, CN, CON(R 15) 2 or unsubstituted C 1-2 aliphatic, or two R 11 groups, together with the carbon to which they are attached, form a cyclopropyl ring or C=O; each R 12 is independently selected from halogen, OCH 3, OH, NO 2, NH 2, SH, SCH 3, NCH 3, CN or unsubstituted C 1-2 aliphatic, or two R 12 groups, together with the carbon to which they are attached, form a cyclopropyl ring; R 8 is C 1-4 aliphatic optionally substituted with 1-5 occurrences of R 12; R 9 is C 1-2 alkyl; R 14 is H or unsubstituted C 1-2 alkyl; R 15 is H or unsubstituted C 1-2 alkyl; and R 7 is a C 2-3 aliphatic or cycloaliphatic optionally substituted with up to 6 occurrences of F. R 3 is H; X 1 is N or CR 4; R 2 is H, F, R', OH, OR', COR', COOH, COOR', CONH 2, CONHR', CON(R') 2, or CN; R 4 is H, F, R', OH, OR', COR', COOH, COOR', CONH 2, CONHR', CON(R') 2, or CN; or R 2 and R 4, taken together, form a 5-7 membered aryl or heteroaryl ring optionally substituted with 1-4 occurrences of R 10; R' is a C 1-3 aliphatic optionally substituted with 1-4 occurrences of R 5; each R 5 is independently selected from halogen, CF 3, OCH 3, OH, SH, NO 2, NH 2, SCH 3, NCH 3, CN or unsubstituted C 1-2 aliphatic, or two R 5 groups, together with the carbon to which they are attached, form a cyclopropyl ring or C=O; each R 10 is independently selected from halogen, OCH 3, OH, NO 2, NH 2, SH, SCH 3, NCH 3, CN or unsubstituted C 1-2 aliphatic; R 1 is R" is H or is a C 1-2 aliphatic optionally substituted with 1-3 occurrences of R 11; each R 11 is independently selected from halogen, OCH 3, OH, SH, NO 2, NH 2, SCH 3, NCH 3, CN, CON(R 15) 2 or unsubstituted C 1-2 aliphatic, or two R 11 groups, together with the carbon to which they are attached, form a cyclopropyl ring or C=O; each R 12 is independently selected from halogen, OCH 3, OH, NO 2, NH 2, SH, SCH 3, NCH 3, CN or unsubstituted C 1-2 aliphatic, or two R 12 groups, together with the carbon to which they are attached, form a cyclopropyl ring; R 8 is C 1-4 aliphatic optionally substituted with 1-5 occurrences of R 12; R 9 is C 1-2 alkyl; R 14 is H or unsubstituted C 1-2 alkyl; R 15 is H or unsubstituted C 1-2 alkyl; and R 7 is a C 2-3 aliphatic or cycloaliphatic optionally substituted with up to 6 occurrences of F.