got both ordering and checkbox functionalities to work in conjunction