added basic shifting function