add split and save functionality