change to module pattern