modified server-select.c