rewrote undo method and added undo button
Fixed ConcurrentModificationException