filter cookies before use