cleanup, socket work