layout the shift matrix