function.js edits