module pattern working