updated html handling