add set up socket logic, seems like there is a logic bug
get rid of a bug
remove redundent files