Assignment 7: finished all basic functionalities