added various features, fixed p vs. lambda bug, test gives same answers as old rarecoal program, nice