adding javadoc, some more tests