fixed haracter check to the class