simplify sanitize() function