use module pattern instead of singleton