minor API refactoring