finished better eval function