process_by_vector function

Process the by vector