revised filtering code

revised filtering code.
still needs more work to get filter checks to compare more than single string.