The invention relates to compounds of formula wherein the substituents are as described in claim 1. Compounds of formula I are modulators for amyloid beta and thus, they may be useful for the treatment or prevention of a disease associated with the deposition of beta-amyloid in the brain, in particular Alzheimer's disease, and other diseases such as cerebral amyloid angiopathy, hereditary cerebral hemorrhage with amyloidosis, Dutch-type (HCHWA-D), multi-infarct dementia, dementia pugilistica and Down syndrome.