lab 6 method implementation and JUnit tests
more stuff