private _sanitize function