sorting, printing, testing and writeup todo

there may be bugs but this is the design I came up with, let me know