fix code so that tests pass
fix code so that tests pass