adding metadata reading functionality