more adaptations to code