update how the id is created and sort by it