corrected unit tests, added javadoc