break computing loop at edge of map