added more checks for the quiz activity