added perplexity and classification