initial commit of this one function.  Hopefully more to follow