remove hash and replace with object