retain and use lambda provided during registration