added possibility to pass custom characters