Changed and added some events to the forEach method