added rudimentary evaluate function

also fixed minor compile error in search and defs