some tests and some javadoc