finalised the output/report part