Updating functions.js