playing sound accordingly