implemented tests and callbacks