close #59 improved generate entrances