Revert "Use lamda"

This reverts commit 45db3f955c9679735ae54e18f09200be033e1b84.