Rough implementation of the job script (by rw)