added variables and else if statements for function quiz