Intellij file
Adjusted structure and added loop