automatic numbering of priorities based on ordered list