delete space
add handlers to socket