removed duplicate output w from shift slice