refactor to craft