added sort options
got guard up, implemented some of shadis changes