Why not assign the val before the closure?