modified exception ,fixed bugs , add dotimes command