Add an open function