modified shell-simplest-loop