some changes from Mandoe