cleanup code
add socket queue