removed unused filter function