modificate main function in req-2