copied updated files from pycogent