refactor(open): externalize state