change fd_set to int for read_fds