improves socket connection