implemented the test and fixed it