The present invention provides a compound of formula (I) or its salts or pharmaceutically acceptable derivatives thereof wherein X1, R1, R2, R3, R4, and R5 are defined as set forth in the specification. The compounds are useful as potassium ion channel inhibitors.