Replace arraylist by hashset in filter, which should improve better