refactored to have the post return the object