renamed query sensibly, implemented basic Exam type