added api_call method