rewriting metadata fetching