fixing function.js