made LoadFromArray less complex