added confirmation function main.js