forEach in loops and improved readability