refactored private methods, updated link to api doc