move to gtest
fixed remaining bugs