switched to module pattern