name the playing sound variable, remove unnecessary variable, improve some loops