added a possibility of saving real arrays of any rank