changes in function.js

changes in function.js