add SLURM commands, remove infinite loop