moved loacl of play code