updated remove and insert