fixed pylint warning and added comments
fixed pylint warning and added comments
fixed error in variable name that was causing an index out of range