Optimized callback implementation. Localized function args