edit todo
refactoring: generalize char selection