Add play mode funcation