corrected evaluate method