add tests
fix serialization, complete tests