debugging functions.js