modified module structure and command line arguments