An initial (but not yet tested) function for processing automation...