tried various routes for converting characters to integers