Programming the statistical library