adding updated functions.js