Thomas davis code added