finalized contextual filtering, resolved #43, resolved #29