A compound of formula I: or a pharmaceutically acceptable salt thereof, wherein R 1 is C 1-6 alkyl, NR 3 R 6, C 1-6 alkoxy, or -S-C 1-6 alkyl; R 2 is C 1-6 atkyl, C 2-6 alkenyl, C 2-6 alkynyl, a C 6-14 aryl group, a C 3-14 cycloalkyl group, a 5 to -14 membered heteroaryl containing 1 to 3 heteroatoms each independently selected from N, O, and S, C 1-6 alkoxy, C 2-6 -alkenyloxy, C 2-6 -alkynyloxy, C 1-6 alkyl-O-R 27, C 1-6 alkyl-C 3-14 cycloalkyl, C 1-6 alkyl-O-C 0-6 alkyl-C 6-14 aryl, C 1-6 alkyl-O-SiR 8 R 9 R 10, halogen, or C 1-6 haloalkyl, wherein R 2 may be unsubstituted or substituted with OH, C1-6alkoxy, or halogen; R 4 and R 5 are independently H, C 1-6 alkyl, C 2-6 alkenyl, C 2-6 alkynyl, a C 6-14 aryl group, a C 3-14 cycloalkyl group, a 3-14 membered cycloheteroalkyl group, a 5-14 membered heteroaryl group, C 1-6 alkoxy, OH, C 1-6 alkylNR 11 R 12, C 1-6 alkyl-O-R 13, C 1-6 alkyl-5-14membered heteroaryl group, or C -C 1-6 alkyl, wherein said C 1-6 alkyl, C 2-6 alkenyl, C 2-6 alkynyl, C 6-14 aryl group, C 3-14 cycloalkyl group, 3-14 membered cycloheteroalkyl group, 5-14 membered heteroaryl group, C 1-6 alkoxy, C 1-6 alkyl-NR 11 R 12, C 1-6 alkylOR 13, C 1-6 alkyl-5-14membered heteroaryl group, or C -C 1-6 alkyl may be optionally substituted by one or more from the group of halogen, a 5-14 membered heteroaryl group, OH, C 1- 6 alkyl, C 1-6 haloalkyl, C 1-6 alkylOR 27, C 1-6 alkoxy, NR 14 R 15, CONR 16 R 17, NR 18 COR 19, NR 20 COOR 21, COR 22, COOR 23, -CN, SO 2 R 26, or NR 24 SO 2 R 25; R 3 and R 6 are independently H, C 1-6 alkyl, C 1-6 alkyl-aryl, C 1-6 alkoxy, a C 3-14 cycloalkyl group, a 3-14 membered cycloheteroalkyl group, a C 6-14 aryl group, a 5-14 membered heteroaryl group, or C 1-6 alkyl-O-R 8, wherein C 1-6 alkyl, C 1-6 alkyl-aryl, C 1-6 alkoxy, a C 3-14 cycloalkyl group, a 3-14 membered cycloheteroalkyl group, a C 6-14 aryl group, a 5-14 membered heteroaryl group, or C 1-6 alkyl-O-R 8, may be substituted by one of more of C 1-6 alkyl, or OH; R 11 and R 12 are the same or different, and independently are selected from hydrogen, C 1-6 alkyl, a C 3-8 cycloalkyl group, a C 6-14 aryl group, a 5-14 membered heteroaryl group, and a 3-14 membered cycloheteroalkyl group, or NR 11 R 12 forms a non-aromatic four to seven membered ring optionally containing a second heteroatom selected from O, N and S, and optionally substituted by one or more substituents R 28; R 7 and R 7a are independently H or C 1-6 alkyl n is 0, 1, or 2; and R 8, R 9, R 10, R 12, R 13, R 14, R 15, R 16, R 17, R 18, R 19, R 20, R 21, R 22, R 23, R 24, R 25, R 26, and R 27, and R 28 are independently H, C 1-6 alkyl, C 2-6 alkenyl, C 2-6 alkynyl, a C 6-14 aryl group, A C 3-14 cycloalkyl group, a 3-14 membered cycloheteroalkyl group, or a 5-14 membered heteroaryl group. R 1 is C 1-6 alkyl, NR 3 R 6, C 1-6 alkoxy, or -S-C 1-6 alkyl; R 2 is C 1-6 atkyl, C 2-6 alkenyl, C 2-6 alkynyl, a C 6-14 aryl group, a C 3-14 cycloalkyl group, a 5 to -14 membered heteroaryl containing 1 to 3 heteroatoms each independently selected from N, O, and S, C 1-6 alkoxy, C 2-6 -alkenyloxy, C 2-6 -alkynyloxy, C 1-6 alkyl-O-R 27, C 1-6 alkyl-C 3-14 cycloalkyl, C 1-6 alkyl-O-C 0-6 alkyl-C 6-14 aryl, C 1-6 alkyl-O-SiR 8 R 9 R 10, halogen, or C 1-6 haloalkyl, wherein R 2 may be unsubstituted or substituted with OH, C1-6alkoxy, or halogen; R 4 and R 5 are independently H, C 1-6 alkyl, C 2-6 alkenyl, C 2-6 alkynyl, a C 6-14 aryl group, a C 3-14 cycloalkyl group, a 3-14 membered cycloheteroalkyl group, a 5-14 membered heteroaryl group, C 1-6 alkoxy, OH, C 1-6 alkylNR 11 R 12, C 1-6 alkyl-O-R 13, C 1-6 alkyl-5-14membered heteroaryl group, or C -C 1-6 alkyl, wherein said C 1-6 alkyl, C 2-6 alkenyl, C 2-6 alkynyl, C 6-14 aryl group, C 3-14 cycloalkyl group, 3-14 membered cycloheteroalkyl group, 5-14 membered heteroaryl group, C 1-6 alkoxy, C 1-6 alkyl-NR 11 R 12, C 1-6 alkylOR 13, C 1-6 alkyl-5-14membered heteroaryl group, or C -C 1-6 alkyl may be optionally substituted by one or more from the group of halogen, a 5-14 membered heteroaryl group, OH, C 1- 6 alkyl, C 1-6 haloalkyl, C 1-6 alkylOR 27, C 1-6 alkoxy, NR 14 R 15, CONR 16 R 17, NR 18 COR 19, NR 20 COOR 21, COR 22, COOR 23, -CN, SO 2 R 26, or NR 24 SO 2 R 25; R 3 and R 6 are independently H, C 1-6 alkyl, C 1-6 alkyl-aryl, C 1-6 alkoxy, a C 3-14 cycloalkyl group, a 3-14 membered cycloheteroalkyl group, a C 6-14 aryl group, a 5-14 membered heteroaryl group, or C 1-6 alkyl-O-R 8, wherein C 1-6 alkyl, C 1-6 alkyl-aryl, C 1-6 alkoxy, a C 3-14 cycloalkyl group, a 3-14 membered cycloheteroalkyl group, a C 6-14 aryl group, a 5-14 membered heteroaryl group, or C 1-6 alkyl-O-R 8, may be substituted by one of more of C 1-6 alkyl, or OH; R 11 and R 12 are the same or different, and independently are selected from hydrogen, C 1-6 alkyl, a C 3-8 cycloalkyl group, a C 6-14 aryl group, a 5-14 membered heteroaryl group, and a 3-14 membered cycloheteroalkyl group, or NR 11 R 12 forms a non-aromatic four to seven membered ring optionally containing a second heteroatom selected from O, N and S, and optionally substituted by one or more substituents R 28; R 7 and R 7a are independently H or C 1-6 alkyl n is 0, 1, or 2; and R 8, R 9, R 10, R 12, R 13, R 14, R 15, R 16, R 17, R 18, R 19, R 20, R 21, R 22, R 23, R 24, R 25, R 26, and R 27, and R 28 are independently H, C 1-6 alkyl, C 2-6 alkenyl, C 2-6 alkynyl, a C 6-14 aryl group, A C 3-14 cycloalkyl group, a 3-14 membered cycloheteroalkyl group, or a 5-14 membered heteroaryl group.