adds module pattern with namespacing