add/remove returns the index of where the element was added