list could be edited by other threads therefore it is not thread save maybe make a copy before iterating?