added models and api for metadata