returning an object from a method