Adjusted code so it is more readable.