adding papertrail logic