more tests and javadoc