adding encoding version
encode version add. improve byte copy