fixed the filter solved function