add tests, debugs