rewrite code to use module pattern