working on turn code