I just copy/pasted from a similar function.  Didn't really change much here.