enhanced callback handling