balance alg
encoding fix