sorting works!

Something went horribly wrong with the UI when I attempted to put some finishing touches on it though.