refactor some code + javadoc