The invention provides compounds of the formula (I): (I) wherein A1, A2, R2, R4, B1, B2, X, X1, n, a and b are as defined are defined in the specification, to pharmaceutical compositions comprising the compounds and the compounds for use as medicaments. The compounds potentiate AMPA receptor function and are expected to be useful in the treatment of central nervous system disorders, for example in the treatment of depressive disorders, mood disorders and cognitive dysfunction associated with neuropsychiatric disorders such as schizophrenia