added tests and fixed some callbacks