making the put request work as it should