add function for get fd