main functionalities implemented