coded some stuff during probability, not tested