bug fixed but tests are not passing