how to evaluate functions?