changed random function to make it category specific and added category-specific problem number function