The present invention relates to compounds of formula wherein Ar, R1, R2, R3, R4, R5, n, o, and p are as defined herein or to pharmaceutically suitable acid addition salts, optically pure enantiomers, racemates or diastereomeric mixtures thereof. The compounds of formula I can be used for the treatment of sleep disorders, such as sleep apnea, narcolepsy, insomnia, parasomnia, jet lag syndrome, circadian rhythms disorder or sleep disorders associated with neurological diseases.