improve auto code gen tools