improved entrance-generation logic