adding logic to change button state on play-pause