finnished the specification for the evaluate function