used a self-calling anonymous function in all js files