added sorting for nom and rtv