metadata: add methods for attributes and retrieval