changed Swap, added removeElement