added javadoc comments and generated javadoc