more conveniently convert integers into bytes and back