Revert "use lambda expression"

This reverts commit a91506fb08bd1ab651dcbc886572503e63fa6338.