final commit of the evening. Added Sorting functionality