implemented directional sorting in GenericList::sort