worked on detecting chars