modified to pass the test