public api refactor