changed some code in the test() method