Socket functionality added