overriding equals method in metadata.java