added working api_handler