migrate 1.x samples to 2.x