DRYing up process_queue