additional tests and javadoc