replace reporting functions to separate module