complete all main functionalities