added sort/filter function from morning demo