added eval and corresponding tests