testing checkCharacter function