Update functional.js