cleaned up code for writing exercise data to send to backend to save a user exercise