splice in forEach is hazardous