scala assn 3: tests passing, not well done though, and haven't started that last bit