fixed up quiz. cleaned up db calls