finished submitResponse api funcitonality