removed api function to perform api call automatically