code polishing
added a possibility of saving real arrays of any rank