Finished coding part of the assignment