fixed process_input