some minor adaptations