Update main function with more parameters.