updated javadoc and junit tests
updated javadoc