Added base input and output to main function.