added twitterror import in stats class