added javadoc and doc