Added capture for lambda