dotimes done, work well now, may need further test