Added updating of stats