cleaning up byte encoding