restructure sample source