regexp hacking... not quite right...