middleware for recording changes in selected models and operations