reorder save preferences function