make fromArray a class member