edit functions.js