commented out debug code for finite differences