added two sorted sets functions