made report function work