Added Dr. Hays' code to ours