working on '~' input, no solution found that is compatible with this version of code