proper charCodeAt usage