changing metadata logic