tweaks to python file; had issues with the tries list