make namespace.js work for functions