add delete character function