fixed evaluate method