refactored common code for setting metadata from creator