A compound of structural formula I: or a pharmaceutically acceptable salt thereof, wherein ring A is a monocyclic heteroaryl containing 1 to 2 N heteroatoms; X is bond, -O-, NH, -(C 1-6 )alkyl-O-, wherein the alkyl or oxygen attaches to ring A, -O-(C 1-6 )alkyl-O-, or -(C 1-6 )alkyl-N(H)-, wherein the alkyl or nitrogen attaches to ring A; R 1 is (C 3-7 )cycloalkyl, heterocycloalkyl containing 1 to 2 heteroatoms independently selected from the group consisting N, S, and O, heteroaryl containing 1 to 3 heteroatoms independently selected from the group consisting of N, O, and S, -S(O) 2 (C 1-3 )alkyl, or -(CH 2 ) q -aryl, wherein each heterocycloalkyl, heteroaryl, aryl, or cycloalkyl groups are unsubstituted or substituted with 1 to 2 substitutents each independently R 5 ; R 2 is (C 1-6 )alkyl, halo(C 1-6 )alkyl, hydroxy(C 1-6 )alkyl, or halo; R 3 is (C 1-6 )alkyl, or halo; R 4 is hydrogen, or (C 1-3 )alkyl; R 5 is oxo, hydroxy, (C 1-6 )alkyl, halo(C 1-6 )alkyl, hydroxy(C 1-6 )alkyl, cyano, phenyl, -S(O) 2 (C 1-3 )alkyl, -(C 1-3 )alkyl-S(O) 2 (C 1-3 )alkyl, or -(C 1-3 )alkyl-N(H)-S(O) 2 (C 1-3 )alkyl; R 6 is hydrogen, (C 1-6 )alkyl, or (C 3-7 )cycloalkyl; n is 0, 1, 2, or 3; m is 1; k is 0, 1, 2 or 3; and q is 0, 1, 2, or 3. ring A is a monocyclic heteroaryl containing 1 to 2 N heteroatoms; X is bond, -O-, NH, -(C 1-6 )alkyl-O-, wherein the alkyl or oxygen attaches to ring A, -O-(C 1-6 )alkyl-O-, or -(C 1-6 )alkyl-N(H)-, wherein the alkyl or nitrogen attaches to ring A; bond, -O-, NH, -(C 1-6 )alkyl-O-, wherein the alkyl or oxygen attaches to ring A, -O-(C 1-6 )alkyl-O-, or -(C 1-6 )alkyl-N(H)-, wherein the alkyl or nitrogen attaches to ring A; R 1 is (C 3-7 )cycloalkyl, heterocycloalkyl containing 1 to 2 heteroatoms independently selected from the group consisting N, S, and O, heteroaryl containing 1 to 3 heteroatoms independently selected from the group consisting of N, O, and S, -S(O) 2 (C 1-3 )alkyl, or -(CH 2 ) q -aryl, (C 3-7 )cycloalkyl, heterocycloalkyl containing 1 to 2 heteroatoms independently selected from the group consisting N, S, and O, heteroaryl containing 1 to 3 heteroatoms independently selected from the group consisting of N, O, and S, -S(O) 2 (C 1-3 )alkyl, or -(CH 2 ) q -aryl, wherein each heterocycloalkyl, heteroaryl, aryl, or cycloalkyl groups are unsubstituted or substituted with 1 to 2 substitutents each independently R 5 ; R 2 is (C 1-6 )alkyl, halo(C 1-6 )alkyl, hydroxy(C 1-6 )alkyl, or halo; (C 1-6 )alkyl, halo(C 1-6 )alkyl, hydroxy(C 1-6 )alkyl, or halo; R 3 is (C 1-6 )alkyl, or halo; (C 1-6 )alkyl, or halo; R 4 is hydrogen, or (C 1-3 )alkyl; hydrogen, or (C 1-3 )alkyl; R 5 is oxo, hydroxy, (C 1-6 )alkyl, halo(C 1-6 )alkyl, hydroxy(C 1-6 )alkyl, cyano, phenyl, -S(O) 2 (C 1-3 )alkyl, -(C 1-3 )alkyl-S(O) 2 (C 1-3 )alkyl, or -(C 1-3 )alkyl-N(H)-S(O) 2 (C 1-3 )alkyl; oxo, hydroxy, (C 1-6 )alkyl, halo(C 1-6 )alkyl, hydroxy(C 1-6 )alkyl, cyano, phenyl, -S(O) 2 (C 1-3 )alkyl, -(C 1-3 )alkyl-S(O) 2 (C 1-3 )alkyl, or -(C 1-3 )alkyl-N(H)-S(O) 2 (C 1-3 )alkyl; R 6 is hydrogen, (C 1-6 )alkyl, or (C 3-7 )cycloalkyl; hydrogen, (C 1-6 )alkyl, or (C 3-7 )cycloalkyl; n is 0, 1, 2, or 3; m is 1; k is 0, 1, 2 or 3; and q is 0, 1, 2, or 3. <EOS>