refactor core -> entity