The invention relates to compounds of formula I wherein X, Y, R<;SUP>;1<;/SUP>;, R<;SUP>;2<;/SUP>;, and n are as defined herein or to a pharmaceutically suitable acid addition salt thereof. The invention also relates to pharmaceutical compositions containing such compounds and methods for the treatment of diseases related to the biological function of the trace amine associated receptors, which diseases include depression, anxiety disorders, bipolar disorder, attention deficit hyperactivity disorder, stress-related disorders, psychotic disorders, schizophrenia, neurological diseases, Parkinson's disease, neurodegenerative disorders, Alzheimer's disease, epilepsy, migraine, substance abuse and metabolic disorders, 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.