repurpose nn.py for testing