Written the System stats function