before major rewrite for slow hub-server