removed donefunc, added formal callbacks