added helper for reading byte arrays