added metadata support