REfactoring avoiding repetaing the same function (using as filter) three times, one for 3, anoher for 5 and another for 7.