adding functions.js