Refactored API method and updated README