Strucuting reports into seperate function