added some new optimal-statistic features