added sorting for wave view