add tests with the modified code