add changes from Fabrizio and CERN