Make changes to code to work with all the tests