put reporting stuff in its own module/file