added Pusher js code in the view, needs refactoring