added prependCharacter and appendCharacter method