Compounds of formula (I) are disclosedCompounds of formula (I) are useful in treating conditions and disorders prevented by or ameliorated by 5-HT6 receptor ligands. Radiolabeled compounds of formula (I) are also useful as diagnostic tools as 5-HT6 positron emission tomography ligands. Also disclosed are pharmaceutical compositions comprising compounds of formula (I), methods for using such compounds and compositions, and a process for preparing compounds within the scope of formula (I).