finished basic functionalities