added comments explaining variables