sanitize id computation