added sorted lists, untested