implement callback scheme
remove debug code