manual merge of changes from renzo