middleware doesn't extend anymore so we need more public access