parser method now correctly identifies each character type in a given line