Add previous work from jcorre.