added JUnit tests, properly