fixed bugs, got it working for all but the edge cases in the shifting methods. Partial success!