add tests, return size from c++!