Added a formating for loop
removed unwanted variable and added a comment