example with taking the amount of diff into account. cf #18