almost got this filtering stuff kinda working