implemented evaluate method