filtering data. getting rid of uneeded directives