correctly handle removal of multiple items
correctly handle removal on edges