fixing methods and passing tests