adding and removing working, loop logic broken