basic implementation of add and remove