refactored LoadFromArray class