sort via uid if is writing