added event listener for sorting