adjust the code in evaluate method