Finished all functionality for assignment 2