added getMetadata() method