some more modifications - add callbacks