refactored API_ xxx usage