Writing code to pass last failed test