changed to revealing module pattern