updated application2.js and index