refactor the api