change DiffWithSaved funtion to be autoload function