added some stuff to functions.js