The invention relates to compounds of formulae I(a)-I(d):and pharmaceutically acceptable derivatives thereof, compositions comprising an effective amount of a compound of formulae I(a)-I(d) or a pharmaceutically acceptable derivative thereof, and methods for treating or preventing a condition such as pain, UI, an ulcer, IBD and IBS, comprising administering to an animal in need thereof an effective amount of a compound of formulae I(a)-I(d) or a pharmaceutically acceptable derivative thereof.