adding prob_encoding scrpts