dynamic def filter based on content type