Oh it does, just pass callback function and it will use it,
just code it in somehwhat more defensive way.

After we good with the format, I could go thru the codebase and replace all inline with callbacks (if there are any left).