restored main to receive arguments