added javadoc and latex