changed the file
modified added loops