made filtering work
filtering seems to work. needs testing.