updated filtering GUI to make it more flexible.