more lambda abstraction code