rewrote the wrap method to use a simple regex