create sanitize function