lot of additions for connectwrapper support