preventing concurrentmodificationexception