refactored entry controller