Updated Codes Sort