locate: small factorisation
locate: fix order