when passing in an object, wrap all the objects functions using the functionwrapper. no unit tests yet.