updated main.js to make background work