first inspection of area guard algorithm: it must have an bug