added sort before display