fixed up to be able to generate report in any phase