change forEach to coffeescript loop for ie support