added isBuffering var