def get_modified(df_old, df_new, unique_id, added_rows=None, trans_col="transaction", trans_val="modified"):
    """Returns the modified rows in df_new

    Parameters
    ----------
        df_old : pd.DataFrame
            dataframe with previous information
        df_new: pd.DataFrame
            dataframe with new information
        unique_id: str or list
            unique identifier(s)
        added_rows: pd.DataFrame
            added rows from calling get_added function
        trans_col: str
            name of column to track transaction (default is "transaction")
        trans_val: str
            name of value to reflect transaction status (default is "modified")
    Returns
    -------
    pd.DataFrame
        dataframe that contains modified rows
    """

    cols = list(df_new.columns)
    if added_rows is not None:
        df_new = df_new[~df_new.isin(list(added_rows[unique_id].values))].dropna()
    modified_rows = df_old.merge(df_new, indicator=True, how='outer')
    modified_rows = modified_rows[modified_rows['_merge'] == 'right_only']
    modified_rows = modified_rows[cols]
    modified_rows[trans_col] = trans_val
    return modified_rows