A compound of formula I: or pharmaceutically acceptable salts thereof, wherein: A is a five- or six-membered saturated or unsaturated ring that includes one or two heteroatoms selected from O, N and S, which is substituted once with R 5, and which is optionally substituted one, two or three times with R 6; X is: -NR a -; -O-; or -S r - wherein r is from 0 to 2 and R a is hydrogen or C 1-6 alkyl; R 1 is: C 1-6 alkyl; C 2-6 alkenyl; C 2-6 alkynyl; halo-C 1-6 alkyl; C 1-6 alkoxy-C 1-6 alkyl; hydroxy-C 1-6 alkyl; amino-C 1-6 alkyl; C 1-6 alkylsulfonyl-C 1-6 alkyl; C 3-6 cycloalkyl optionally substituted with C 1-6 alkyl; C 3-6 cycloalkyl-C 1-6 alkyl wherein the C 3-6 cycloalkyl portion is optionally substituted with C 1-6 alkyl; tetrahydrofuranyl; tetrahydrofuranyl-C 1-6 alkyl; oxetanyl; or oxetan-C 1-6 alkyl; or R 1 and R a 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 C 1-6 alkyl; R 2 is: halo; C 1-6 alkoxy; cyano; C 2-6 alkynyl; C 2-6 alkenyl; halo-C 1-6 alkyl; halo-C 1-6 alkoxy; C 3-6 cycloalkyl wherein the C 3-6 cycloalkyl portion is optionally substituted with C 1-6 alkyl; C 3-6 cycloalkyl-C 1-6 alkyl wherein the C 3-6 cycloalkyl portion is optionally substituted with C 1-6 alkyl; tetrahydrofuranyl; tetrahydrofuranyl-C 1-6 alkyl; acetyl; oxetanyl; or oxetan-C 1-6 alkyl; one of R 3 and R 4 is: halo; C 1-6 alkyl; C 1-6 alkoxy; C 3-6 cycloalkyloxy; halo-C 1-6 alkyl; or halo-C 1-6 alkoxy, and the other is hydrogen; R 5 is; oxo; C 1-6 alkyl; C 3-6 cycloalkyl; C 3-6 cycloalkyl-C 1-6 alkyl; or -C -NR b R c wherein R b and R c each independently is hydrogen or -C 1-6 alkyl, or R b and R c together with the atoms to which they are attached may form a heterocyclyl group that optionally includes an additional heteroatom selected from O, N and S and which is optionally substituted one or more times with R 6; and each R 6 is independently: C 1-6 alkyl; C 3-6 cycloalkyl; C 3-6 cycloalkyl-C 1-6 alkyl; halo; halo-C 1-6 alkyl; hydroxy-C 1-6 alkyl; C 1-6 alkoxy-C 1-6 alkyl; heterocyclyl; oxo; or -C -NR b R c. A is a five- or six-membered saturated or unsaturated ring that includes one or two heteroatoms selected from O, N and S, which is substituted once with R 5, and which is optionally substituted one, two or three times with R 6; X is: -NR a -; -O-; or -S r - wherein r is from 0 to 2 and R a is hydrogen or C 1-6 alkyl; R 1 is: C 1-6 alkyl; C 2-6 alkenyl; C 2-6 alkynyl; halo-C 1-6 alkyl; C 1-6 alkoxy-C 1-6 alkyl; hydroxy-C 1-6 alkyl; amino-C 1-6 alkyl; C 1-6 alkylsulfonyl-C 1-6 alkyl; C 3-6 cycloalkyl optionally substituted with C 1-6 alkyl; C 3-6 cycloalkyl-C 1-6 alkyl wherein the C 3-6 cycloalkyl portion is optionally substituted with C 1-6 alkyl; tetrahydrofuranyl; tetrahydrofuranyl-C 1-6 alkyl; oxetanyl; or oxetan-C 1-6 alkyl; or R 1 and R a 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 C 1-6 alkyl; R 2 is: halo; C 1-6 alkoxy; cyano; C 2-6 alkynyl; C 2-6 alkenyl; halo-C 1-6 alkyl; halo-C 1-6 alkoxy; C 3-6 cycloalkyl wherein the C 3-6 cycloalkyl portion is optionally substituted with C 1-6 alkyl; C 3-6 cycloalkyl-C 1-6 alkyl wherein the C 3-6 cycloalkyl portion is optionally substituted with C 1-6 alkyl; tetrahydrofuranyl; tetrahydrofuranyl-C 1-6 alkyl; acetyl; oxetanyl; or oxetan-C 1-6 alkyl; one of R 3 and R 4 is: halo; C 1-6 alkyl; C 1-6 alkoxy; C 3-6 cycloalkyloxy; halo-C 1-6 alkyl; or halo-C 1-6 alkoxy, and the other is hydrogen; R 5 is; oxo; C 1-6 alkyl; C 3-6 cycloalkyl; C 3-6 cycloalkyl-C 1-6 alkyl; or -C -NR b R c wherein R b and R c each independently is hydrogen or -C 1-6 alkyl, or R b and R c together with the atoms to which they are attached may form a heterocyclyl group that optionally includes an additional heteroatom selected from O, N and S and which is optionally substituted one or more times with R 6; and each R 6 is independently: C 1-6 alkyl; C 3-6 cycloalkyl; C 3-6 cycloalkyl-C 1-6 alkyl; halo; halo-C 1-6 alkyl; hydroxy-C 1-6 alkyl; C 1-6 alkoxy-C 1-6 alkyl; heterocyclyl; oxo; or -C -NR b R c.