Add sort to move array