organized it into a packaged module
simplified