refactored output y dataframes