set up play loop