A compound of formula wherein A 1, A 2 and A 3 are C, B is ethylene, ethenylene or -O-C 1 alkyl, R 1 and R 2 together with the nitrogen atom to which they are attached, form azetidinyl, morpholinyl, pyrrolidinyl, piperidinyl, pyrazolidinyl, which can be substituted by 1 to 3 substituents independently selected from the group consisting of halogen, C 1 -C 7 -alkyl, C 1 -C 7 -hydroxyalkyl, C 1 -C 7 alkoxy, C 1 -C 7 -haloalkyl, hydroxyl and oxo; R 3 is selected from pyridine, pyrazine, pyrimidine, imidazole, oxazole, quinoxaline, quinazoline, substituted by 1 to 3 substituents selected from halogen, C 1 -C 7 -alkyl, C 1 -C 7 alkoxy, aryl, heteroaryl, -NR 5 R 6, -O-R 7 or R 3 is selected from the group consisting of: R 8, R 9 and R 10 are independently selected from hydrogen, C 1 -C 7 -alkyl and NR 5 R 6, R 11 is selected from hydrogen, halogen, C 1 -C 7 -alkyl, C 1 -C 7 alkoxy, R 12 is selected from hydrogen or C 1 -C 7 -alkyl, R 13 is selected from hydrogen, C 1 -C 7 -alkyl optionally substituted by halogen, C 3 -C 8 cycloalkyl, -C -NH 2. R 4 is selected from hydrogen, C 1 -C 7 -alkyl, C 3 -C 8 -cycloalkyl, R 5 and R 6 are independently selected from hydrogen, C 1 -C 7 -alkyl, R 5 and R 6 together with the nitrogen atom to which they are attached, form a heterocycloalkyl which can be substituted by 1 to 3 substituents independently selected from the group consisting of halogen, C 1 -C 7 -alkyl, C 1 -C 7 -hydroxyalkyl, C 1 -C 7 alkoxy, C 1 -C 7 -haloalkyl and oxo; R 7 is selected from C 1 -C 7 -alkyl, C 1 -C 7 -haloalkyl and heterocycloalkyl, R' and R" are independently selected from hydrogen and C 1 -C 7 -alkyl. A 1, A 2 and A 3 are C, B is ethylene, ethenylene or -O-C 1 alkyl, R 1 and R 2 together with the nitrogen atom to which they are attached, form azetidinyl, morpholinyl, pyrrolidinyl, piperidinyl, pyrazolidinyl, which can be substituted by 1 to 3 substituents independently selected from the group consisting of halogen, C 1 -C 7 -alkyl, C 1 -C 7 -hydroxyalkyl, C 1 -C 7 alkoxy, C 1 -C 7 -haloalkyl, hydroxyl and oxo; R 3 is selected from pyridine, pyrazine, pyrimidine, imidazole, oxazole, quinoxaline, quinazoline, substituted by 1 to 3 substituents selected from halogen, C 1 -C 7 -alkyl, C 1 -C 7 alkoxy, aryl, heteroaryl, -NR 5 R 6, -O-R 7 or R 3 is selected from the group consisting of: R 8, R 9 and R 10 are independently selected from hydrogen, C 1 -C 7 -alkyl and NR 5 R 6, R 11 is selected from hydrogen, halogen, C 1 -C 7 -alkyl, C 1 -C 7 alkoxy, R 12 is selected from hydrogen or C 1 -C 7 -alkyl, R 13 is selected from hydrogen, C 1 -C 7 -alkyl optionally substituted by halogen, C 3 -C 8 cycloalkyl, -C -NH 2. R 4 is selected from hydrogen, C 1 -C 7 -alkyl, C 3 -C 8 -cycloalkyl, R 5 and R 6 are independently selected from hydrogen, C 1 -C 7 -alkyl, R 5 and R 6 together with the nitrogen atom to which they are attached, form a heterocycloalkyl which can be substituted by 1 to 3 substituents independently selected from the group consisting of halogen, C 1 -C 7 -alkyl, C 1 -C 7 -hydroxyalkyl, C 1 -C 7 alkoxy, C 1 -C 7 -haloalkyl and oxo; R 7 is selected from C 1 -C 7 -alkyl, C 1 -C 7 -haloalkyl and heterocycloalkyl, R' and R" are independently selected from hydrogen and C 1 -C 7 -alkyl. R 8, R 9 and R 10 are independently selected from hydrogen, C 1 -C 7 -alkyl and NR 5 R 6, R 11 is selected from hydrogen, halogen, C 1 -C 7 -alkyl, C 1 -C 7 alkoxy, R 12 is selected from hydrogen or C 1 -C 7 -alkyl, R 13 is selected from hydrogen, C 1 -C 7 -alkyl optionally substituted by halogen, C 3 -C 8 cycloalkyl, -C -NH 2. R 4 is selected from hydrogen, C 1 -C 7 -alkyl, C 3 -C 8 -cycloalkyl, R 5 and R 6 are independently selected from hydrogen, C 1 -C 7 -alkyl, R 5 and R 6 together with the nitrogen atom to which they are attached, form a heterocycloalkyl which can be substituted by 1 to 3 substituents independently selected from the group consisting of halogen, C 1 -C 7 -alkyl, C 1 -C 7 -hydroxyalkyl, C 1 -C 7 alkoxy, C 1 -C 7 -haloalkyl and oxo; R 7 is selected from C 1 -C 7 -alkyl, C 1 -C 7 -haloalkyl and heterocycloalkyl, R' and R" are independently selected from hydrogen and C 1 -C 7 -alkyl.