Added linking by metadata values
added more flexibility for loading by metadata