local deformations code improved (but it still has some problems)