writing the sort list ui