add method was modified along with remove method