Is it safe to remove element inside the loop?  Iterator is preferred to be used. see:
http://stackoverflow.com/questions/223918/efficient-equivalent-for-removing-elements-while-iterating-the-collection
http://stackoverflow.com/questions/10431981/remove-elements-from-collection-while-iterating