Remove the side effects and pass the tests