updated scope open/close