some changes to evaluate method