adding explicit variable names, improving comments