started with fixIllegalCharacter function