wrapped api call in method