made some changes to sockClient