fixed analyseAnswers in StatisticsService + Tests written + Refactoring