add generator and generetor_test