implementation of scan callbacks