updating javadoc and converting helper methods to package private to allow unit testing