added most of the basic functionalities