A compound of formula I: or a pharmaceutically acceptable salt thereof, wherein, independently for each occurrence and optionally substituted with halo, cyano, oxoalkoxy, hydroxy, amino, nitro, aryl, haloalkyl, and alkyl as valency allows: A is or is selected from a heteroaryl or heterocyclic group of the formula: R 1 is C1-C6 alkyl, C3-C8 cycloalkyl, C1-C6 alkoxy, halo, CN, OH, OR 7, N(R 7) 2, NR 7 SO 2 R 7, SO 2 R 7, SR 7, SOR 7, CO 2 R 7, NR 7 COR 7, NR 7 CO 2 R 7, CON(R 7) 2, SO 2 N(R 7) 2, CF 3, OCF 3, OCHF 2, heterocycloalkyl, aryl, heteroaryl or (CH 2) 1-6 -R 8 wherein up to two CH 2 units may be replaced with O, CO, S, SO, SO 2, NR 7; R 2 is H, C1-C6 alkyl, C1-C6 haloalkyl, C3-C8 cycloalkyl, halo, aryl, COOH, CH 2 CF 3, CHF 2, CF 3, CN, OH, OR 7, CON(R 7) 2, SO 2 R 7, SR 7, SOR 7, SO 2 N(R 7) 2, or (CH 2) 1-6 -R 8 wherein up to two CH 2 units may be replaced with O, CO, S, SO, SO 2, CF 2, or NR 7; R 3 is halo, C1-C6 alkyl or C3-C8 cycloalkyl, wherein up to two CH 2 units may be replaced by O, CO, S, SO, SO 2, or NR 8; R 4 is H, C1-C6 alkyl, C3-C8 cycloalkyl, C1-C6 alkoxy, halo, CN, OH, OR 7, N(R 7) 2, NR 7 SO 2 R 7, SO 2 R 7, SR 7, SOR 7, CO 2 R 7, NR 7 COR 7, NR 7 CO 2 R 7, CON(R 7) 2, SO 2 N(R 7) 2, CHF 2, CF 3, OCF 3, OCHF 2, heterocycloalkyl, aryl, heteroaryl, or a straight chain, branched, or cyclic (CH 2) 1-8 -R 8 wherein up to three CH 2 units may be replaced with O, CO, S, SO, SO 2, or NR 7; R 5 is H, C1-C6 alkyl, C3-C8 cycloalkyl, C1-C6 alkoxy, C3-C8 cycloalkoxy, halo, CN, OH, OR 7, N(R 7) 2, NR 7 SO 2 R 7, SO 2 R 7, SR 7, SOR 7, CO 2 R 7, NR 7 COR 7, NR 7 CO 2 R 7, CON(R 7) 2, SO 2 N(R 7) 2, CF 3, OCF 3, OCHF 2, heterocycloalkyl, aryl, heteroaryl, or a straight chain, branched, or cyclic (CH 2) 1-8 -R 8 wherein up to three CH 2 units may be replaced with O, CO, S, SO, SO 2, or NR 7; R 6 is H, C1-C6 alkyl, C3-C8 cycloalkyl, C1-C6 alkoxy, halo, CN, OH, OR 7, N(R 7) 2, NR 7 SO 2 R 7, SR 7, SOR 7, SO 2 R 7, CO 2 R 7, NR 7 COR 7, NR 7 CO 2 R 7, CON(R 7) 2, SO 2 N(R 7) 2, CF 3, OCF 3, OCHF 2, heterocycloalkyl, aryl, heteroaryl, or a straight chain, branched, or cyclic (CH 2) 1-8 -R 8 wherein up to three CH 2 units may be replaced with O, CO, S, SO, SO 2, or NR 7; or two occurrences of R 4 and R 5, or R 5 and R 6, taken together with the carbons to which they are attached form a ring comprising up to 2 heteroatoms, optionally substituted with halo, cyano, oxoalkoxy, hydroxy, amino, nitro, aryl, haloalkyl, and alkyl; R 7 is H, C1-C6 alkyl, CHF 2, CF 3, or C3-C8 cycloalkyl, or 2 R 7 taken together with the atoms to which they are attached form a ring; R 8 is H, CF 3, CO 2 R 7, OH, aryl, heteroaryl, C3-C8 cycloalkyl, heterocycloalkyl, N(R 7) 2, NR 7 COR 7, CON(R 7) 2, CN, or SO 2 R 7; X is N, S, or CR 2 wherein at least one X is N; W is N or CH, wherein up to 2 W are N; a ---- line denotes an optionally double bond depending on the identity of X; m is an integer from 0 to 4 inclusive; n is an integer from 0 to 3 inclusive; and o is an integer from 0 to 4 inclusive. A is or is selected from a heteroaryl or heterocyclic group of the formula: R 1 is C1-C6 alkyl, C3-C8 cycloalkyl, C1-C6 alkoxy, halo, CN, OH, OR 7, N(R 7) 2, NR 7 SO 2 R 7, SO 2 R 7, SR 7, SOR 7, CO 2 R 7, NR 7 COR 7, NR 7 CO 2 R 7, CON(R 7) 2, SO 2 N(R 7) 2, CF 3, OCF 3, OCHF 2, heterocycloalkyl, aryl, heteroaryl or (CH 2) 1-6 -R 8 wherein up to two CH 2 units may be replaced with O, CO, S, SO, SO 2, NR 7; R 2 is H, C1-C6 alkyl, C1-C6 haloalkyl, C3-C8 cycloalkyl, halo, aryl, COOH, CH 2 CF 3, CHF 2, CF 3, CN, OH, OR 7, CON(R 7) 2, SO 2 R 7, SR 7, SOR 7, SO 2 N(R 7) 2, or (CH 2) 1-6 -R 8 wherein up to two CH 2 units may be replaced with O, CO, S, SO, SO 2, CF 2, or NR 7; R 3 is halo, C1-C6 alkyl or C3-C8 cycloalkyl, wherein up to two CH 2 units may be replaced by O, CO, S, SO, SO 2, or NR 8; R 4 is H, C1-C6 alkyl, C3-C8 cycloalkyl, C1-C6 alkoxy, halo, CN, OH, OR 7, N(R 7) 2, NR 7 SO 2 R 7, SO 2 R 7, SR 7, SOR 7, CO 2 R 7, NR 7 COR 7, NR 7 CO 2 R 7, CON(R 7) 2, SO 2 N(R 7) 2, CHF 2, CF 3, OCF 3, OCHF 2, heterocycloalkyl, aryl, heteroaryl, or a straight chain, branched, or cyclic (CH 2) 1-8 -R 8 wherein up to three CH 2 units may be replaced with O, CO, S, SO, SO 2, or NR 7; R 5 is H, C1-C6 alkyl, C3-C8 cycloalkyl, C1-C6 alkoxy, C3-C8 cycloalkoxy, halo, CN, OH, OR 7, N(R 7) 2, NR 7 SO 2 R 7, SO 2 R 7, SR 7, SOR 7, CO 2 R 7, NR 7 COR 7, NR 7 CO 2 R 7, CON(R 7) 2, SO 2 N(R 7) 2, CF 3, OCF 3, OCHF 2, heterocycloalkyl, aryl, heteroaryl, or a straight chain, branched, or cyclic (CH 2) 1-8 -R 8 wherein up to three CH 2 units may be replaced with O, CO, S, SO, SO 2, or NR 7; R 6 is H, C1-C6 alkyl, C3-C8 cycloalkyl, C1-C6 alkoxy, halo, CN, OH, OR 7, N(R 7) 2, NR 7 SO 2 R 7, SR 7, SOR 7, SO 2 R 7, CO 2 R 7, NR 7 COR 7, NR 7 CO 2 R 7, CON(R 7) 2, SO 2 N(R 7) 2, CF 3, OCF 3, OCHF 2, heterocycloalkyl, aryl, heteroaryl, or a straight chain, branched, or cyclic (CH 2) 1-8 -R 8 wherein up to three CH 2 units may be replaced with O, CO, S, SO, SO 2, or NR 7; or R 7 is H, C1-C6 alkyl, CHF 2, CF 3, or C3-C8 cycloalkyl, or 2 R 7 taken together with the atoms to which they are attached form a ring; R 8 is H, CF 3, CO 2 R 7, OH, aryl, heteroaryl, C3-C8 cycloalkyl, heterocycloalkyl, N(R 7) 2, NR 7 COR 7, CON(R 7) 2, CN, or SO 2 R 7; X is N, S, or CR 2 wherein at least one X is N; W is N or CH, wherein up to 2 W are N; a ---- line denotes an optionally double bond depending on the identity of X; m is an integer from 0 to 4 inclusive; n is an integer from 0 to 3 inclusive; and o is an integer from 0 to 4 inclusive.