fix tests, format
fix unit tests