local derivative pattern