module pattern restruct