added a wrapper function for open_clientfd, still no luck with threads