adding code for shiftrows. UGLY code for shiftrows
horrifiying shiftrows