tests and debug