minor update and adding javadoc