pi-estimation. incomplete and buggy