package split, saving data and drawing plot