cleaned up the api-calls