add get characters function