Attempting different methods of detection.  updated shifter function to draw black for shifts outside the frame.