allow for passing an object