yet an other rewrite