Add an updated Curt's code.