refactor to publish API wrapper