solved filter functionality