added iterate_nonzeros function to mi object.