open encounter logic improved