refactor entry