added socket codes