adding encoding beta