Changes in shell script to include all flipflop