tests and callbacks