final API refactor