adds initial sort stuff