[refac] use lambda iso local function
[tidy] whitespace, remove unneeded function