replaced ArrayList with a thread-safe CopyOnWriteArrayList
currently slow in some places