Created evaluation function.