Some modifications after marco's comments