adding previous data output
add toggle link for showing before and after records