moving towards a rewrite