Added missing algorithm for for_each