added socketIO functionality