improve generate lt functions html