homework1, task3, edit by Gong Yunqing