clean up lambda sample

the lambda can be written cleaner