Added updateStats function to stats manager