LPS-34428 Move metadata addition to element out to a method
temp