fixed function.js