simplified socket management; upgraded versions