Compounds of the formula wherein two of A 1, A 2 or A 3 are N and one of A 1, A 2 or A 3 is CH; R 1 is selected from the group consisting of C 1-7 - alkyl, C 3-7 -cycloalkyl, C 3-7 -cycloalkyl-C 1-7 -alkyl, hydroxyl-C 1-7 -alkyl, alkoxy-C 1-7 -alkyl, halogen-C 1-7 -alkyl, carbamoyl-C 1-7 -alkyl, C 1-7 -alkylcarbonylamino-C 1-7 -alkyl, phenyl-C 1-7 -alkyl, heterocyclyl-C 1-7 -alkyl wherein the heterocyclyl group is unsubstituted or substituted by oxo, heteroaryl-C 1-7 -alkyl wherein the heteroaryl group is unsubstituted or mono- or di-substituted by C 1-7 -alkyl and phenyl which is unsubstituted or mono- or di-substituted by halogen; R 2 and R 6 independently from each other are hydrogen or halogen; R 3 and R 5 independently from each other are selected from the group consisting of hydrogen, C 1-7 -alkyl, C 1-7 -alkoxy, halogen, halogen-C 1-7 -alkyl, halogen-C 1-7 -alkoxy and cyano; R 4 is selected from the group consisting of hydrogen, C 1-7 -alkoxy, halogen, halogen-C 1-7 -alkyl, halogen-C 1-7 -alkoxy and cyano; or R 4 and R 5 together with the C atoms they are attached to form a five- or six-membered carbocycle or a five- or six-membered heterocycle containing one, two or three heteroatoms selected from the group consisting of N, O and S, said carbocycle or heterocycle being unsubstituted or substituted by one or two substituents independently selected from the group consisting of C 1-7 -alkyl, C 1-7 -alkoxy, halogen, halogen-C 1-7 -alkyl, halogen-C 1-7 -alkoxy and cyano; R 7 and R 7' independently from each other are hydrogen or C 1-7 -alkyl; R 8 is a five- or six-membered heteroaryl group containing one, two or three heteroatoms selected from the group consisting of N, O and S, said heteroaryl group being unsubstituted or substituted by one or two substituents independently selected from the group consisting of C 1-7 -alkyl, C 1-7 -alkoxy, halogen, halogen-C 1-7 -alkyl and C 3-7 -cycloalkyl; and pharmaceutically acceptable salts thereof. R 1 is selected from the group consisting of C 1-7 - alkyl, C 3-7 -cycloalkyl, C 3-7 -cycloalkyl-C 1-7 -alkyl, hydroxyl-C 1-7 -alkyl, alkoxy-C 1-7 -alkyl, halogen-C 1-7 -alkyl, carbamoyl-C 1-7 -alkyl, C 1-7 -alkylcarbonylamino-C 1-7 -alkyl, phenyl-C 1-7 -alkyl, heterocyclyl-C 1-7 -alkyl wherein the heterocyclyl group is unsubstituted or substituted by oxo, heteroaryl-C 1-7 -alkyl wherein the heteroaryl group is unsubstituted or mono- or di-substituted by C 1-7 -alkyl and phenyl which is unsubstituted or mono- or di-substituted by halogen; R 2 and R 6 independently from each other are hydrogen or halogen; R 3 and R 5 independently from each other are selected from the group consisting of hydrogen, C 1-7 -alkyl, C 1-7 -alkoxy, halogen, halogen-C 1-7 -alkyl, halogen-C 1-7 -alkoxy and cyano; R 4 is selected from the group consisting of hydrogen, C 1-7 -alkoxy, halogen, halogen-C 1-7 -alkyl, halogen-C 1-7 -alkoxy and cyano; or R 4 and R 5 together with the C atoms they are attached to form a five- or six-membered carbocycle or a five- or six-membered heterocycle containing one, two or three heteroatoms selected from the group consisting of N, O and S, said carbocycle or heterocycle being unsubstituted or substituted by one or two substituents independently selected from the group consisting of C 1-7 -alkyl, C 1-7 -alkoxy, halogen, halogen-C 1-7 -alkyl, halogen-C 1-7 -alkoxy and cyano; R 7 and R 7' independently from each other are hydrogen or C 1-7 -alkyl; R 8 is a five- or six-membered heteroaryl group containing one, two or three heteroatoms selected from the group consisting of N, O and S, said heteroaryl group being unsubstituted or substituted by one or two substituents independently selected from the group consisting of C 1-7 -alkyl, C 1-7 -alkoxy, halogen, halogen-C 1-7 -alkyl and C 3-7 -cycloalkyl;