updated sorting and styling