refactored APIs