Updated pass9 to work with char input