refactor process_input into indiv methods