update template for handling sorting and filter