A compound of formula I: in which: p is selected from 0 and 1; q is selected from 0 and 1; Y 1 is selected from CH and N; Y 2 is selected from CR 6 and N; R 1 is -XR 1a; wherein R 1a is selected from C 6-10 aryl, C 3-8 cycloalkyl, C 3-8 cycloalkenyl and a 5-9 member heteroaryl group containing from 1 to 4 heteroatoms or groups independently selected from N, C, O and S; wherein said aryl or heteroaryl of R 1a is substituted with 1 to 5 R 9 groups independently selected from halo, amino, hydroxy, N 3, C 1-4 alkyl, dimethyl-amino, hydroxy-substituted-C 1-4 alkyl, halo-substituted-C 1-4 alkyl and amino-substituted-C 1-4 alkyl; and X is selected from a bond, S m, O, C, COR 11, CR 10a R 10b, NR 11; wherein m is selected from 0, 1 and 2; each R 10a and R 10b is independently selected from halo and C 1-4 alkyl; and R 11 is selected from hydrogen and C 1-4 alkyl; R 2a and R 2b are independently selected from hydrogen, C 1-4 alkyl, C 1-4 alkoxy, amino, hydroxy, C 3-8 cycloalkyl and C 1-4 alkyl-amino; R 3a and R 3b are independently selected from halo, carbonyl, C 1-4 alkyl, C 1-4 alkoxy, amino, hydroxy, C 3-8 cycloalkyl and C 1-4 alkyl-amino; R 4a and R 4b are independently selected from hydrogen, halo, carbonyl, C 1-4 alkyl, C 1-4 alkoxy, amino, hydroxy, C 3-8 cycloalkyl and C 1-4 alkyl-amino; R 5a and R 5b are independently selected from hydrogen, carbonyl, C 1-4 alkyl, C 1-4 alkoxy, amino, hydroxy, C 3-8 cycloalkyl and C 1-4 alkyl-amino; wherein any two groups selected from R 2a, R 2b, R 3a, R 3b, R 4a, R 4b, R 5a, R 5b and R 7 can form a 5 to 6 member unsaturated or partially saturated ring; R 6 is selected from hydrogen, halo, cyano, C 1-4 alkyl, C 1-4 alkoxy, amino-carbonyl, halo-substituted C 1-4 alkyl, halo-substituted C 1-4 alkoxy, hydroxy-substituted C 1-4 alkyl, amino-substituted C 1-4 alkyl, -S 1-2 R 6a, -C R 6a, -C NR 6a R 6b, -C NR 6a R 6b and -NR 6a C R 6b; wherein R 6a and R 6b are independently selected from hydrogen and C 1-4 alkyl; R 7 and R 8 together with the carbon atom to which they are both attached form a 3 to 7 member saturated or partially unsaturated ring that can optionally contain 1 to 3 heteroatoms or groups independently selected from N, C, O and S m; wherein m is selected from 0, 1 and 2; wherein said saturated ring formed by R 7 and R 8 can be unsubstituted or substituted with 1 to 3 groups independently selected from amino, hydroxy, methoxy, halo, methyl, methyl-amino and isobutyryloxy; or a pharmaceutically acceptable salt thereof. p is selected from 0 and 1; q is selected from 0 and 1; Y 1 is selected from CH and N; Y 2 is selected from CR 6 and N; R 1 is -XR 1a; wherein R 1a is selected from C 6-10 aryl, C 3-8 cycloalkyl, C 3-8 cycloalkenyl and a 5-9 member heteroaryl group containing from 1 to 4 heteroatoms or groups independently selected from N, C, O and S; wherein said aryl or heteroaryl of R 1a is substituted with 1 to 5 R 9 groups independently selected from halo, amino, hydroxy, N 3, C 1-4 alkyl, dimethyl-amino, hydroxy-substituted-C 1-4 alkyl, halo-substituted-C 1-4 alkyl and amino-substituted-C 1-4 alkyl; and X is selected from a bond, S m, O, C, COR 11, CR 10a R 10b, NR 11; wherein m is selected from 0, 1 and 2; each R 10a and R 10b is independently selected from halo and C 1-4 alkyl; and R 11 is selected from hydrogen and C 1-4 alkyl; R 2a and R 2b are independently selected from hydrogen, C 1-4 alkyl, C 1-4 alkoxy, amino, hydroxy, C 3-8 cycloalkyl and C 1-4 alkyl-amino; R 3a and R 3b are independently selected from halo, carbonyl, C 1-4 alkyl, C 1-4 alkoxy, amino, hydroxy, C 3-8 cycloalkyl and C 1-4 alkyl-amino; R 4a and R 4b are independently selected from hydrogen, halo, carbonyl, C 1-4 alkyl, C 1-4 alkoxy, amino, hydroxy, C 3-8 cycloalkyl and C 1-4 alkyl-amino; R 5a and R 5b are independently selected from hydrogen, carbonyl, C 1-4 alkyl, C 1-4 alkoxy, amino, hydroxy, C 3-8 cycloalkyl and C 1-4 alkyl-amino; wherein any two groups selected from R 2a, R 2b, R 3a, R 3b, R 4a, R 4b, R 5a, R 5b and R 7 can form a 5 to 6 member unsaturated or partially saturated ring; R 6 is selected from hydrogen, halo, cyano, C 1-4 alkyl, C 1-4 alkoxy, amino-carbonyl, halo-substituted C 1-4 alkyl, halo-substituted C 1-4 alkoxy, hydroxy-substituted C 1-4 alkyl, amino-substituted C 1-4 alkyl, -S 1-2 R 6a, -C R 6a, -C NR 6a R 6b, -C NR 6a R 6b and -NR 6a C R 6b; wherein R 6a and R 6b are independently selected from hydrogen and C 1-4 alkyl; R 7 and R 8 together with the carbon atom to which they are both attached form a 3 to 7 member saturated or partially unsaturated ring that can optionally contain 1 to 3 heteroatoms or groups independently selected from N, C, O and S m; wherein m is selected from 0, 1 and 2; wherein said saturated ring formed by R 7 and R 8 can be unsubstituted or substituted with 1 to 3 groups independently selected from amino, hydroxy, methoxy, halo, methyl, methyl-amino and isobutyryloxy; or a pharmaceutically acceptable salt thereof.