beginning turn code