Merge edit report function from Joseph