reimplement the open method