added shift processing function