refactor to entry everywhere