updated for shifts, still needs for memory shift