compiles now; added perplexity reporting