added shift sorted array