created logic of playback and sound