added javadocs.