fixed logic in creating questions