Changed variable names for better readability
Added descriptions for the two functions