added a clear method to filter collections