major compositional rewrite