refactor the tests
correction of bug