pbs_submit function (probably buggy)