Finished the basic functionalities