added method analyseAnswers to service.js