Remove unneeded variable
Use loops to make code a bit more readable