charValue() method fixed and code optimized!