added backend functionality for the quiz