A compound of formula I: in which: n is selected from 0, 1 and 2; m is selected from 0, 1 and 2; X is selected from O and NR 6; wherein R 6 is C 1-4 alkyl; Y 1 is selected from N and CR 7; wherein R 7 is selected from hydrogen and C 1-4 alkyl; R 1 is hydrogen; R 2 is selected from hydrogen and halo; R 3 is selected from -CH 2 CH 2 R 8b and -CR 8a =CR 8a R 8b; wherein each R 8a is independently selected from hydrogen, fluoro and C 1-4 alkyl; and R 8b is selected from -C OR 9a, - C NR 9a R 9b, -C NHOR 9a, -C X 2 R 9a and a 5-6 member heteroaryl selected from: wherein the dotted line indicates the point of attachment with -CH 2 CH 2 or -CR 8a =CR 8a of R 3; wherein X 2 is C 1-4 alkylene; R 9a and R 9b are independently selected from hydrogen, C 1-4 alkyl, hydroxy-substituted-C 1-4 alkyl, halo-substituted-C 1-4 alkyl and -X 4 R 10; wherein X 4 is selected from a bond and C 1-3 alkylene; and R 10 is a 4-6 member saturated ring containing 1 to 3 atoms independently selected from O, N and S; wherein said heteroaryl of R 8b is unsubstituted or substituted with 1 to 3 groups independently selected from C 1-4 alkyl and C 3-8 cycloalkyl; R 4 is selected from hydrogen, C 1-4 alkyl, halo and C 1-3 alkoxy; R 5 is selected from C 6-10 aryl and a 5-6 member heteroaryl selected from: wherein the dotted line indicates the point of attachment with the benzothiophene core; wherein said C 6-10 aryl or heteroaryl of R 5 is substituted with 1 to 3 group selected from -X 3 -R 5a and R 5a; wherein X 3 is methylene; R 5a is selected from hydroxy, amino, C 1-4 alkyl, halo, nitro, cyano, halo-substituted-C 1-4 alkyl, cyano-substituted-C 1-4 alkyl, hydroxy-substituted-C 1-4 alkyl, halo-substituted-C 1-4 alkoxy, C 1 - 4 alkoxy, -SF 5, -NR 11a R 11b, -C R 11a, C 3-8 cycloalkyl and a 4-7 member saturated, unsaturated or partially saturated ring containing one to 4 heteroatoms or groups selected from O, NH, C and S 0-2; wherein R 11a and R 11b are independently selected from hydrogen and C 1-4 alkyl; or R 11a and R 11b together with the nitrogen to which they are both attached form a 4 to 7 member saturated ring containing one other heteroatom or group selected from O, NH, and S 0-2; wherein said 4-7 member ring of R 5a can be unsubstituted or substituted with C 1-4 alkyl; or a pharmaceutically acceptable salt thereof. n is selected from 0, 1 and 2; m is selected from 0, 1 and 2; X is selected from O and NR 6; wherein R 6 is C 1-4 alkyl; Y 1 is selected from N and CR 7; wherein R 7 is selected from hydrogen and C 1-4 alkyl; R 1 is hydrogen; R 2 is selected from hydrogen and halo; R 3 is selected from -CH 2 CH 2 R 8b and -CR 8a =CR 8a R 8b; wherein each R 8a is independently selected from hydrogen, fluoro and C 1-4 alkyl; and R 8b is selected from -C OR 9a, - C NR 9a R 9b, -C NHOR 9a, -C X 2 R 9a and a 5-6 member heteroaryl selected from: wherein the dotted line indicates the point of attachment with -CH 2 CH 2 or -CR 8a =CR 8a of R 3; wherein X 2 is C 1-4 alkylene; R 9a and R 9b are independently selected from hydrogen, C 1-4 alkyl, hydroxy-substituted-C 1-4 alkyl, halo-substituted-C 1-4 alkyl and -X 4 R 10; wherein X 4 is selected from a bond and C 1-3 alkylene; and R 10 is a 4-6 member saturated ring containing 1 to 3 atoms independently selected from O, N and S; wherein said heteroaryl of R 8b is unsubstituted or substituted with 1 to 3 groups independently selected from C 1-4 alkyl and C 3-8 cycloalkyl; R 4 is selected from hydrogen, C 1-4 alkyl, halo and C 1-3 alkoxy; R 5 is selected from C 6-10 aryl and a 5-6 member heteroaryl selected from: wherein the dotted line indicates the point of attachment with the benzothiophene core; wherein said C 6-10 aryl or heteroaryl of R 5 is substituted with 1 to 3 group selected from -X 3 -R 5a and R 5a; wherein X 3 is methylene; R 5a is selected from hydroxy, amino, C 1-4 alkyl, halo, nitro, cyano, halo-substituted-C 1-4 alkyl, cyano-substituted-C 1-4 alkyl, hydroxy-substituted-C 1-4 alkyl, halo-substituted-C 1-4 alkoxy, C 1 - 4 alkoxy, -SF 5, -NR 11a R 11b, -C R 11a, C 3-8 cycloalkyl and a 4-7 member saturated, unsaturated or partially saturated ring containing one to 4 heteroatoms or groups selected from O, NH, C and S 0-2; wherein R 11a and R 11b are independently selected from hydrogen and C 1-4 alkyl; or R 11a and R 11b together with the nitrogen to which they are both attached form a 4 to 7 member saturated ring containing one other heteroatom or group selected from O, NH, and S 0-2; wherein said 4-7 member ring of R 5a can be unsubstituted or substituted with C 1-4 alkyl; or a pharmaceutically acceptable salt thereof.