logic addition and variable name change on line 7