enabled api calls, refactored