Modified methods to pass the tests.