Text this: Redrafting imperfect legislation