rewrote generate_runlog. its twice as fast now, but id still call it slow...