introducing filter for nested phrases