more filter and added a count function