added more javadoc and one test