Use a function to get stats