all the functionalities finished