move around the update_data functionality, outside of gen_server