better implementation of get_exif