I would suggest we move this part of code into `input_parser.js`, and try to integrate with existing code.