Scala kata - make all tests pass by implementing methods