Compounds of the formula I: n nor pharmaceutically acceptable salts thereof,n wherein Ar, X, m, R 1 , R 2 are as defined herein. Also provided are methods for preparing, compositions comprising, and methods for using compounds of formula I for treatment of 5-HT6-mediated diseases.