changed post to put request to update data rather than add new data