added functions.js