changed code to handle metadata as it is currently returned from the conductor service