core.js created with the loop and listeners