added getFiltered function in permits