A compound of formula ( I-AA): wherein: X 1 is CR 1, N or NO; X 2 is CR 1, N or NO; X 3 is CR 1, N or NO; X 4 is CR 1, N or NO; and one or two of X 1, X 2, X 3 and X 4 is N; R 1 is H, halogen, CN, C 1 -C 6 alkoxy, or C 1 -C 6 alkyl; R 2, R 3 and R 4 are independently selected from the group consisting of H, optionally substituted C 1 -C 6 alkyl, optionally substituted C 2 -C 6 alkenyl, optionally substituted C 2 -C 6 alkynyl, optionally substituted C 1 -C 6 alkoxy, mono or bicyclic optionally substituted C 6 -C 14 aryl, mono or bicyclic optionally substituted heteroaryl, optionally substituted (aryl)alkyl, (alkoxy)carbonyl, (alkyl)amido, (alkyl)amino, optionally substituted mono or bicyclic cycloalkyl, optionally substituted mono or bicyclic heterocyclyl, aminoalkyl, alkylcarboxyl, (alkyl)carboxyamido, optionally substituted (aryl)amino, hydroxyl, halogen, C 1 -C 6 haloalkyl, optionally substituted heterocyclyl(alkyl)-, optionally substituted heteroaryl(alkyl), hydroxyalkyl, perfluoroalkyl, optionally substituted aryloxy, optionally substituted heteroaryloxy, optionally substituted C 3 -C 8 cycloalkoxy, N(R 7) 2, CN, NO 2, CO 2 H, CONR A R B, S n R 7, and optionally substituted heterocyclyloxy having 1 to 2 heteroatoms selected from the group consisting of O, S n, and NR 7; n is 0 to 2; R a and R B are independently selected from the group consisting of H, optionally substituted C 1 -C 6 alkyl, optionally substituted mono or bicyclic C 6 -C 14 aryl, optionally substituted mono or bicyclic heteroaryl, optionally substituted (aryl)alkyl, optionally substituted mono or bicyclic C 3 -C 8 cycloalkyl, optionally substituted mono or bicyclic heterocyclyl, C 1 -C 6 haloalkyl, optionally substituted heterocyclyl(alkyl), optionally substituted heteroaryl(alkyl), hydroxyalkyl, and perfluoroalkyl; R 7 is H, C 1 -C 6 alkyl, mono or bicyclic C 6 -C 14 aryl, mono or bicyclic heteroaryl, (aryl)alkyl, (alkoxy)carbonyl, (alkyl)amido, (alkyl)amino, mono or bicyclic cycloalkyl, mono or bicyclic heterocyclyl, alkylcarboxyl, heterocyclyl(alkyl), heteroaryl(alkyl), hydroxyalkyl, perfluoroalkyl, aryloxy, heteroaryloxy, C 3 -C 6 cycloalkoxy, or heterocyclyloxy having 1 to 2 heteroatoms selected from the group consisting of O, S n, and NR A; R 5 and R 6 are independently selected from the group consisting of H, optionally substituted C 1 -C 6 alkyl, optionally substituted mono or bicyclic C 6 -C 14 aryl, optionally substituted mono or bicyclic heteroaryl, optionally substituted (aryl)alkyl, optionally substituted mono or bicyclic cycloalkyl, optionally substituted mono or bicyclic heterocyclyl, C 1 -C 6 haloalkyl, optionally substituted heterocyclyl(alkyl), optionally substituted heteroaryl(alkyl), hydroxyalkyl, and perfluoroalkyl; and R 8 is H or optionally substituted C 1 -C 6 alkyl; or a pharmaceutically acceptable salt thereof. X 1 is CR 1, N or NO; X 2 is CR 1, N or NO; X 3 is CR 1, N or NO; X 4 is CR 1, N or NO; and one or two of X 1, X 2, X 3 and X 4 is N; R 1 is H, halogen, CN, C 1 -C 6 alkoxy, or C 1 -C 6 alkyl; R 2, R 3 and R 4 are independently selected from the group consisting of H, optionally substituted C 1 -C 6 alkyl, optionally substituted C 2 -C 6 alkenyl, optionally substituted C 2 -C 6 alkynyl, optionally substituted C 1 -C 6 alkoxy, mono or bicyclic optionally substituted C 6 -C 14 aryl, mono or bicyclic optionally substituted heteroaryl, optionally substituted (aryl)alkyl, (alkoxy)carbonyl, (alkyl)amido, (alkyl)amino, optionally substituted mono or bicyclic cycloalkyl, optionally substituted mono or bicyclic heterocyclyl, aminoalkyl, alkylcarboxyl, (alkyl)carboxyamido, optionally substituted (aryl)amino, hydroxyl, halogen, C 1 -C 6 haloalkyl, optionally substituted heterocyclyl(alkyl)-, optionally substituted heteroaryl(alkyl), hydroxyalkyl, perfluoroalkyl, optionally substituted aryloxy, optionally substituted heteroaryloxy, optionally substituted C 3 -C 8 cycloalkoxy, N(R 7) 2, CN, NO 2, CO 2 H, CONR A R B, S n R 7, and optionally substituted heterocyclyloxy having 1 to 2 heteroatoms selected from the group consisting of O, S n, and NR 7; n is 0 to 2; R a and R B are independently selected from the group consisting of H, optionally substituted C 1 -C 6 alkyl, optionally substituted mono or bicyclic C 6 -C 14 aryl, optionally substituted mono or bicyclic heteroaryl, optionally substituted (aryl)alkyl, optionally substituted mono or bicyclic C 3 -C 8 cycloalkyl, optionally substituted mono or bicyclic heterocyclyl, C 1 -C 6 haloalkyl, optionally substituted heterocyclyl(alkyl), optionally substituted heteroaryl(alkyl), hydroxyalkyl, and perfluoroalkyl; R 7 is H, C 1 -C 6 alkyl, mono or bicyclic C 6 -C 14 aryl, mono or bicyclic heteroaryl, (aryl)alkyl, (alkoxy)carbonyl, (alkyl)amido, (alkyl)amino, mono or bicyclic cycloalkyl, mono or bicyclic heterocyclyl, alkylcarboxyl, heterocyclyl(alkyl), heteroaryl(alkyl), hydroxyalkyl, perfluoroalkyl, aryloxy, heteroaryloxy, C 3 -C 6 cycloalkoxy, or heterocyclyloxy having 1 to 2 heteroatoms selected from the group consisting of O, S n, and NR A; R 5 and R 6 are independently selected from the group consisting of H, optionally substituted C 1 -C 6 alkyl, optionally substituted mono or bicyclic C 6 -C 14 aryl, optionally substituted mono or bicyclic heteroaryl, optionally substituted (aryl)alkyl, optionally substituted mono or bicyclic cycloalkyl, optionally substituted mono or bicyclic heterocyclyl, C 1 -C 6 haloalkyl, optionally substituted heterocyclyl(alkyl), optionally substituted heteroaryl(alkyl), hydroxyalkyl, and perfluoroalkyl; and R 8 is H or optionally substituted C 1 -C 6 alkyl; or a pharmaceutically acceptable salt thereof.