pass one file descriptor instead of three