sorted list with key value pairs are added