added filter logic to table body