fix quiz functions