Safer implementation