massive commit, trying to hack together socketing