The present invention relates to compounds of formula wherein R1 is a one or two membered heteroaryl group, selected from the group consisting of R2 is hydrogen or halogen; or R1 and R2 may form together with the carbon atoms to with they are attached the following rings R3 is hydrogen, halogen or lower alkyl; n is 1 or 2; R4 is phenyl, optionally substituted by one or two substituents, selected from halogen or cyano, or is pyridinyl, optionally substituted by halogen, or is tetrahydropyran, or is -NH-C(O)-phenyl, optionally substituted by halogen; R5 is hydrogen or halogen; R6 - R13 are phenyl, optionally substituted by halogen: R14 is -NH-C(O)-phenyl, substituted by halogen; R15 is hydrogen, lower alkyl substituted by halogen or is halogen; R16 is hydrogen or lower alkoxy; R17 is pyridinyl, optionally substituted by lower alkoxy or lower alkyl substituted by halogen; or to a pharmaceutically suitable acid addition salt thereof, to all racemic mixtures, to all their corresponding enantiomers and/or optical isomers and to all tautomeric forms of compounds of formula I. The compounds of formula I have a good affinity to the trace amine associated receptors (TAARs), especially for TAAR1. The compounds may be used for the treatment of depression, anxiety disorders, bipolar disorder, attention deficit hyperactivity disorder (ADHD), stress-related disorders, psychotic disorders such as schizophrenia, neurological diseases such as Parkinson’s disease, neurodegenerative disorders such as Alzheimer’s disease, epilepsy, migraine, hypertension, substance abuse and metabolic disorders such as eating disorders, diabetes, diabetic complications, obesity, dyslipidemia, disorders of energy consumption and assimilation, disorders and malfunction of body temperature homeostasis, disorders of sleep and circadian rhythm, and cardiovascular disorders.本發明係關於如下式之化合物其中R1係一或二員雜芳基,選自由以下基團組成之群:R2係氫或鹵素;或R1及R2可與連接其等之碳原子一起形成以下環R3係氫、鹵素或低碳數烷基;n為1或2;R4為視需要經選自鹵素或氰基之一或兩