added to stats function