Removed unused reorder_array function