implement sort to skip sorting for values with sort dir being falsy