completed code generetor for class method