process_input_args function

Process inputs to main functions