debugged distributions.c, more tests will follow