change iterate over dimensions to have an option for modifying the parent array