updating js parsing from pubnub