added a function to evaluate