attempt at rewrite...