cleaned up api calls in controllers