frontend for sorting