homework1 by Qiyuan Shi