Changed a delegate to a lambda