add tests for PI stuff