added javadoc.