Started work on attachMetadata