How to create a repeating shift