improve and simplify open method