added caching inline to avoid new scope