generate trainning set