begin moving socket functionality to separate server