got rid of the anonymous function in the main.js