First attempt to externalize stat fn as well.