Refactored API