implemented sound playing functionality