made small change in naming df in fxn to avoid a row.names warning.