refactored some of the api