Revised code with no operator control
start of sequence based code