A compound of formula I or a pharmaceutically acceptable salt thereof, wherein A is 1) a 9-10 membered bicyclic heterocycle having 2-3 heteroatoms independently selected from N, S and O, which 9-10 membered bicyclic heterocycle is unsubstituted or substituted with =O, -C(=NH)NH 2, or pyrazole, or 2) a 12-, 13-, or 14-membered tricyclic heterocycle having 3-5 heteroatoms selected from N, S and O, which 12-, 13-, or 14-membered heterocycle is unsubstituted or substituted with =O or NH 2; B is 1) a 5-membered monocyclic heterocycle having 2 nitrogen atoms and 3 carbon atoms, where one 5-membered monocyclic heterocycle nitrogen is substituted with a) 6-membered monocyclic heterocyle having one or two nitrogen atoms or one oxygen atom, b) C 1-6 alkyl, c) C 3-8 carbocycle, or d) aryl, wherein heterocycle, alkyl, carbocycle and aryl are unsubstituted, mono-substituted, or independently di-substituted with CF 3, OCH 3, F, CN, -CHF 2, or =O, and one 5-membered monocyclic heterocycle carbon atom is unsubstituted or substituted with C 1-6 alkyl, 2) a 6-membered monocyclic heterocycle having 1 nitrogen atom and 5 carbon atoms, where three carbon atoms are unsubstituted, and one or two carbon atoms are independently unsubstituted or independently substituted with CF 3, -C(CH 3) 2 OH, -OCHF 2, -CH(CF 3)OH, - C(CF 3)(CH 3)OH, F, or 3) aryl, substituted with -C 1-6 alkyl. A is 1) a 9-10 membered bicyclic heterocycle having 2-3 heteroatoms independently selected from N, S and O, which 9-10 membered bicyclic heterocycle is unsubstituted or substituted with =O, -C(=NH)NH 2, or pyrazole, or 2) a 12-, 13-, or 14-membered tricyclic heterocycle having 3-5 heteroatoms selected from N, S and O, which 12-, 13-, or 14-membered heterocycle is unsubstituted or substituted with =O or NH 2; 1) a 9-10 membered bicyclic heterocycle having 2-3 heteroatoms independently selected from N, S and O, which 9-10 membered bicyclic heterocycle is unsubstituted or substituted with =O, -C(=NH)NH 2, or pyrazole, or 2) a 12-, 13-, or 14-membered tricyclic heterocycle having 3-5 heteroatoms selected from N, S and O, which 12-, 13-, or 14-membered heterocycle is unsubstituted or substituted with =O or NH 2; B is 1) a 5-membered monocyclic heterocycle having 2 nitrogen atoms and 3 carbon atoms, where one 5-membered monocyclic heterocycle nitrogen is substituted with a) 6-membered monocyclic heterocyle having one or two nitrogen atoms or one oxygen atom, b) C 1-6 alkyl, c) C 3-8 carbocycle, or d) aryl, wherein heterocycle, alkyl, carbocycle and aryl are unsubstituted, mono-substituted, or independently di-substituted with CF 3, OCH 3, F, CN, -CHF 2, or =O, and one 5-membered monocyclic heterocycle carbon atom is unsubstituted or substituted with C 1-6 alkyl, 2) a 6-membered monocyclic heterocycle having 1 nitrogen atom and 5 carbon atoms, where three carbon atoms are unsubstituted, and one or two carbon atoms are independently unsubstituted or independently substituted with CF 3, -C(CH 3) 2 OH, -OCHF 2, -CH(CF 3)OH, - C(CF 3)(CH 3)OH, F, or 3) aryl, substituted with -C 1-6 alkyl. 1) a 5-membered monocyclic heterocycle having 2 nitrogen atoms and 3 carbon atoms, where one 5-membered monocyclic heterocycle nitrogen is substituted with a) 6-membered monocyclic heterocyle having one or two nitrogen atoms or one oxygen atom, b) C 1-6 alkyl, c) C 3-8 carbocycle, or d) aryl, wherein heterocycle, alkyl, carbocycle and aryl are unsubstituted, mono-substituted, or independently di-substituted with CF 3, OCH 3, F, CN, -CHF 2, or =O, and one 5-membered monocyclic heterocycle carbon atom is unsubstituted or substituted with C 1-6 alkyl, a) 6-membered monocyclic heterocyle having one or two nitrogen atoms or one oxygen atom, b) C 1-6 alkyl, c) C 3-8 carbocycle, or d) aryl, wherein heterocycle, alkyl, carbocycle and aryl are unsubstituted, mono-substituted, or independently di-substituted with CF 3, OCH 3, F, CN, -CHF 2, or =O, 2) a 6-membered monocyclic heterocycle having 1 nitrogen atom and 5 carbon atoms, where three carbon atoms are unsubstituted, and one or two carbon atoms are independently unsubstituted or independently substituted with CF 3, -C(CH 3) 2 OH, -OCHF 2, -CH(CF 3)OH, - C(CF 3)(CH 3)OH, F, or 3) aryl, substituted with -C 1-6 alkyl.