updated frontend js file