Fixed broken tests and wrote a new test and coded a solution