Removed chunking from filter function