Finished the requirements of Assignment1