added some javadoc.