minor changes and adaptations