Modify parse_input() method