removed unnecessary echos that were in the way of the returned object