Added filter by factor functionality