add removal of components in pair sorting
make pair sorting interface more generic
add stream variant to pair sorting as output