almost done with functionalities