lambda executes correctly