good call. some of this code is interesting due to adapting from pycogent.