wip split out undb websock code