updated html function