Refactored into API methods