use open function