refactor to match new Core