updated remove and insert methods