Modified to fit my preferred indenting style, addendum added for importance of descriptive variable names.