A compound of formula I: or pharmaceutically acceptable salts thereof, wherein: m is from 0 to 3; X is: -NRa-; -O-; or -S r- wherein r is from 0 to 2 and Ra is hydrogen or C1-6alkyl; Y is C or N; R1 is: C1-6alkyl; C2-6alkenyl; C2-6alkynyl; halo-C1-6alkyl; C1-6alkoxy-C1-6alkyl; hydroxy-C1-6alkyl; amino-C1-6 alkyl wherein the amino group is optionally substituted with one or two alkyl; C1-6alkylsulfonyl-C1-6alkyl; C3-6cycloalkyl optionally substituted with C1-6alkyl; C3-6cycloalkyl-C1-6alkyl wherein the C3-6cycloalkyl portion is optionally substituted with C1-6alkyl; tetrahydrofuranyl; tetrahydrofuranyl-C1-6alkyl; oxetanyl; or oxetan-C1-6alkyl; or R1 and Ra together with the atoms to which they are attached may form a three to six membered ring that may optionally include an additional heteroatom selected from O, N and S, and which is substituted with oxo, halo or C1-6alkyl; R2 is: halo; C1-6alkoxy; cyano; C2-6alkynyl; C2-6alkenyl; halo-C1-6alkyl; halo-C1-6alkoxy; C3-6cycloalkyl wherein the C3-6cycloalkyl portion is optionally substituted with C1-6alkyl; C3-6cycloalkyl-C1-6alkyl wherein the C3-6cycloalkyl portion is optionally substituted with C1-6alkyl; tetrahydrofuranyl; tetrahydrofuranyl-C1-6alkyl; acetyl; oxetanyl; or oxetan-C1-6alkyl; R3 and R4 each independently is: halo; C1-6alkyl; C1-6alkoxy; C3-6cycloalkyloxy; halo-C1-6alkyl; or halo-C1-6alkoxy; and R5 is a 5-membered heteroaryl group optionally substituted one or more times with R6; and R6 is: C1-6alkyl; C3-6cycloalkyl; C3-6cycloalkyl-C1-6alkyl; halo; halo-C1-6alkyl; C1-6alkoxy; heterocyclyl; oxo; or -C -NRbRc wherein Rb and Rc each independently is hydrogen or -C1-6alkyl. m is from 0 to 3; X is: -NRa-; -O-; or -S r- wherein r is from 0 to 2 and Ra is hydrogen or C1-6alkyl; Y is C or N; R1 is: C1-6alkyl; C2-6alkenyl; C2-6alkynyl; halo-C1-6alkyl; C1-6alkoxy-C1-6alkyl; hydroxy-C1-6alkyl; amino-C1-6 alkyl wherein the amino group is optionally substituted with one or two alkyl; C1-6alkylsulfonyl-C1-6alkyl; C3-6cycloalkyl optionally substituted with C1-6alkyl; C3-6cycloalkyl-C1-6alkyl wherein the C3-6cycloalkyl portion is optionally substituted with C1-6alkyl; tetrahydrofuranyl; tetrahydrofuranyl-C1-6alkyl; oxetanyl; or oxetan-C1-6alkyl; or R1 and Ra together with the atoms to which they are attached may form a three to six membered ring that may optionally include an additional heteroatom selected from O, N and S, and which is substituted with oxo, halo or C1-6alkyl; R2 is: halo; C1-6alkoxy; cyano; C2-6alkynyl; C2-6alkenyl; halo-C1-6alkyl; halo-C1-6alkoxy; C3-6cycloalkyl wherein the C3-6cycloalkyl portion is optionally substituted with C1-6alkyl; C3-6cycloalkyl-C1-6alkyl wherein the C3-6cycloalkyl portion is optionally substituted with C1-6alkyl; tetrahydrofuranyl; tetrahydrofuranyl-C1-6alkyl; acetyl; oxetanyl; or oxetan-C1-6alkyl; R3 and R4 each independently is: halo; C1-6alkyl; C1-6alkoxy; C3-6cycloalkyloxy; halo-C1-6alkyl; or halo-C1-6alkoxy; and R5 is a 5-membered heteroaryl group optionally substituted one or more times with R6; and R6 is: C1-6alkyl; C3-6cycloalkyl; C3-6cycloalkyl-C1-6alkyl; halo; halo-C1-6alkyl; C1-6alkoxy; heterocyclyl; oxo; or -C -NRbRc wherein Rb and Rc each independently is hydrogen or -C1-6alkyl.