Finished the coding part of HW5