Add lambda sample
refactoring