added a metadata class, modifyed read_cr2 to return metadata