tool generate code