tweaked sorting