javadoc and refactor