changed metadata to objectMetadata, added methods for back compatibility