`.stats`is used 2 times, consider caching it in local variable