The present invention relates to a compound of formula IwhereinR1 is phenyl, lower alkyl, C3-6-cycloalkyl, —;CH2—;C3-6-cycloalkyl or bridged C4-6-cycloalkyl, substituted by one, two or three halogen atoms, or by lower alkyl or lower alkyl substituted by halogen;R2 is a five or six membered heteroaryl group, selected fromwhereinR6 is hydrogen, lower alkyl, halogen or lower alkoxy; andR7 is hydrogen, lower alkoxy or halogen;R3 is lower alkyl or lower alkyl substituted by hydroxy:R4 is hydrogen or lower alkyl;R5 is hydrogen or lower alkyl;n is 1 or 2;-( )n- is —;CH2—; or —;CH2CH2—; for n being 1 or 2;or to a pharmaceutically active acid addition salt thereof, to a racemic mixture or to its corresponding enantiomer and/or optical isomer and/or stereoisomer thereofThe compounds may be used for the treatment of Alzheimer's disease, cerebral amyloid angiopathy, hereditary cerebral hemorrhage with amyloidosis, Dutch-type (HCHWA-D), multi-infarct dementia, dementia pugilistica or Down syndrome.