judge length first!