shiftr implementation