added code to read catalogues