More work on stats.cs