add Mike's changes to Python code