-Removed call to poll() in api function