moved to make socket resolution work