working version with socket.io pushing badge id to client