module pattern implemented