minor changes
added javadoc