Modified evaluate function