implement add and remove functionalities