move socket to a separate file
add id to socket