messing with pubnub. finally got subscribe working. I guess you need .ready() when you use require?