For homework submission for CSCI 5714 from Yiren Ding & Yingbin Liang