filter function working for star rating