Add simple sort
READ_NUM and READ_LEN set as arguments