commented out parts of update function for debugging