modify rbd_open function