add start of socket code