A compound of Formula I: wherein: X is CR 3 or N; Y is CR 3 or N; Ring B is a 5 or 6-membered heteroaryl ring or phenyl; R 1 is independently selected from H, halo, CN, (CRa 2) n R 8, -N(R 8) 2, (C 3 -C 6)cycloalkylCOOR 8, (CR a 2) n COOR 8, (CR a 2) n C NR a R 8, (CR a 2) n C NR a SO 2 R 8, (CR a 2) n NR a C R 8, (CR a 2) n OR 8, (CR a 2) n C R 8 and (CR a 2) n O(CR a 2) n COOR a; R 2 is independently selected from H, halo, CN, amide, aryl, heterocyclic, (CR a 2) n COOR 8, -N(R a) 2, (CR a 2) n OR a, (CR a 2) n SR a and -SO 2 R a, wherein the aryl or heterocyclic is optionally subtituted with one to three substituents selected from cyano, hydroxy, amide, halo and methoxy; Provided that R 1 and R 2 are not both H; R 3 is independently selected from the group consisting of: H, cyano, hydroxy, and alkoxy; R 4 is heteroaryl which is optionally substituted with halo, halo-(C 1 -C 6)alkyl, (C 1 -C 6)alkyl, or -(C 1 -C 6)alkoxy; R 5 is H, (C 1 -C 6)alkyl, (C 1 -C 6)alkenyl, (C 1 -C 6)alkynyl, (CR b 2) t COOH, (CR b 2) t N(R 9) 2, (CR b 2) t OR 9 or (CR b 2) t R 9; R 6 is independently (C 1 -C 6)alkyl; R 7 is haloalkyl, -NR a C R a, or C N(R a) 2; R 8 is independently selected from H, halo, OH, CN, (C 1 -C 6)alkyl, (C 3 -C 8)cycloalkyl, heterocylic, heterocyclenyl, heteroaryl, (C 1 -C 6)alkylheterocyclic, (C 1 -C 6)alkylheterocyclenyl and (C 1 -C 6)alkylheteroaryl, wherein said alkyl, cycloalkyl, heterocyclic, heterocyclenyl and heteroaryl is optionally substituted with (C 1 -C 6)alkyl, (CR a 2) n OR a, -N(R a) 2, (CR a 2) n COOR a, (CR a 2) n C NR a R a, or (CR a 2) n NR a C R a. R 9 is independently H, (C 1 -C 6)alkyl, (C 3 -C 8)cycloalkyl, heteroaryl, heterocyclenyl or heterocyclic, wherein the alkyl, cycloalkyl, heteroaryl, heterocyclenyl and heterocyclic is optionally substituted with (C 1 -C 6)alkyl, (C 3 -C 8)cycloalkyl, (CR a 2) n COOH, or (CR a 2) n OR b; R 10 is independently (C 1 -C 6)alkyl; R a is independently H or (C 1 -C 6)alkyl, wherein the alkyl is optionally substituted with (C 0 -C 6)alkyl-OH or -(C 0 -C 6)alkylOMe; and R b is independently H or (C 1 -C 6)alkyl; m is 1, 2, or 3; n is independently 0, 1, 2, 3, 4 or 5; p is 0, 1, or 2; q is 0, 1, 2, or 3; r is 1, 2 or 3; t is 0, 1, 2 or 3. or a pharmaceutically acceptable salt thereof. X is CR 3 or N; Y is CR 3 or N; Ring B is a 5 or 6-membered heteroaryl ring or phenyl; R 1 is independently selected from H, halo, CN, (CRa 2) n R 8, -N(R 8) 2, (C 3 -C 6)cycloalkylCOOR 8, (CR a 2) n COOR 8, (CR a 2) n C NR a R 8, (CR a 2) n C NR a SO 2 R 8, (CR a 2) n NR a C R 8, (CR a 2) n OR 8, (CR a 2) n C R 8 and (CR a 2) n O(CR a 2) n COOR a; R 2 is independently selected from H, halo, CN, amide, aryl, heterocyclic, (CR a 2) n COOR 8, -N(R a) 2, (CR a 2) n OR a, (CR a 2) n SR a and -SO 2 R a, wherein the aryl or heterocyclic is optionally subtituted with one to three substituents selected from cyano, hydroxy, amide, halo and methoxy; Provided that R 1 and R 2 are not both H; R 3 is independently selected from the group consisting of: H, cyano, hydroxy, and alkoxy; R 4 is heteroaryl which is optionally substituted with halo, halo-(C 1 -C 6)alkyl, (C 1 -C 6)alkyl, or -(C 1 -C 6)alkoxy; R 5 is H, (C 1 -C 6)alkyl, (C 1 -C 6)alkenyl, (C 1 -C 6)alkynyl, (CR b 2) t COOH, (CR b 2) t N(R 9) 2, (CR b 2) t OR 9 or (CR b 2) t R 9; R 6 is independently (C 1 -C 6)alkyl; R 7 is haloalkyl, -NR a C R a, or C N(R a) 2; R 8 is independently selected from H, halo, OH, CN, (C 1 -C 6)alkyl, (C 3 -C 8)cycloalkyl, heterocylic, heterocyclenyl, heteroaryl, (C 1 -C 6)alkylheterocyclic, (C 1 -C 6)alkylheterocyclenyl and (C 1 -C 6)alkylheteroaryl, wherein said alkyl, cycloalkyl, heterocyclic, heterocyclenyl and heteroaryl is optionally substituted with (C 1 -C 6)alkyl, (CR a 2) n OR a, -N(R a) 2, (CR a 2) n COOR a, (CR a 2) n C NR a R a, or (CR a 2) n NR a C R a. R 9 is independently H, (C 1 -C 6)alkyl, (C 3 -C 8)cycloalkyl, heteroaryl, heterocyclenyl or heterocyclic, wherein the alkyl, cycloalkyl, heteroaryl, heterocyclenyl and heterocyclic is optionally substituted with (C 1 -C 6)alkyl, (C 3 -C 8)cycloalkyl, (CR a 2) n COOH, or (CR a 2) n OR b; R 10 is independently (C 1 -C 6)alkyl; R a is independently H or (C 1 -C 6)alkyl, wherein the alkyl is optionally substituted with (C 0 -C 6)alkyl-OH or -(C 0 -C 6)alkylOMe; and R b is independently H or (C 1 -C 6)alkyl; m is 1, 2, or 3; n is independently 0, 1, 2, 3, 4 or 5; p is 0, 1, or 2; q is 0, 1, 2, or 3; r is 1, 2 or 3; t is 0, 1, 2 or 3.