Update functor.js