updated damas.utils.filter method