added two functionalities