refactoring
refactored Socket section
change