added a mechanism to set and get metadata