starting sorting impl

(WIP)