1 13 cleanup

I messed up this code in the conversion to the new api.  also needs test.