fix bug prior->distribution + tests_pipe now all passing