implemented sorting and conversion to dto lists for collections