now working server-select.c