better abstraction for metadatastorage