finished report function!