updated the api handler and raw handler