switch var name from reserved word char to charCode