add hidden field, move generate code, echo test