added evaluate() function