updated import metadata logic