more changes to handle high load, closing sockets
error checks....