add support for scan callbacks