some corrections from Stéfan