refactor entry helper and entry controller