filled in more lambda code